Hi Philip,

On Sat, Sep 25, 2010 at 01:08:20PM -0700, Philip Rakity wrote:
> The change proposed by Richard Zhu for handling write protect uses 
> only a callback.
> 
> <snip>
> static int sdhci_get_ro(struct mmc_host *mmc)
> {
>       struct sdhci_host *host;
>       unsigned long flags;
>       int present;
> 
>       host = mmc_priv(mmc);
> 
>       if (host->ops->get_ro)
>               return host->ops->get_ro(host);
> 
>       spin_lock_irqsave(&host->lock, flags);
> 
> <end snip>
> 
> What is the correct practice?  

I think that the get_ro hook is reasonable in this case -- we're saying
that the host has a sufficiently weird WP setup that sdhci doesn't know 
what we're supposed to do (unlike SDHCI_QUIRK_INVERTED_WRITE_PROTECT).

I'd be curious to hear what others think, though.  Should we be simply
moving away from adding new quirks, or just limiting them to cases where
a full hook isn't warranted?

-- 
Chris Ball   <c...@laptop.org>   <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to