Minor nit...

On 04/28/2014 02:40 AM, Andreas Fenkart wrote:
[..]
>       /* Do not initialize card-specific things if the power is off */
>       if (host->power_mode == MMC_POWER_OFF)
> @@ -1117,8 +1138,12 @@ static irqreturn_t omap_hsmmc_irq(int irq, void 
> *dev_id)
>       int status;
>  
>       status = OMAP_HSMMC_READ(host->base, STAT);
> -     while (status & INT_EN_MASK && host->req_in_progress) {
> -             omap_hsmmc_do_irq(host, status);
> +     while (status & (INT_EN_MASK | CIRQ_EN)) {
> +             if (host->req_in_progress)
> +                     omap_hsmmc_do_irq(host, status);
> +
> +             if (status & CIRQ_EN)
> +                     mmc_signal_sdio_irq(host->mmc);
>  
>               /* Flush posted write */
>               status = OMAP_HSMMC_READ(host->base, STAT);
> @@ -1127,6 +1152,23 @@ static irqreturn_t omap_hsmmc_irq(int irq, void 
> *dev_id)
>       return IRQ_HANDLED;
>  }
>  
> +static irqreturn_t omap_hsmmc_wake_irq(int irq, void *dev_id)
> +{
> +     struct omap_hsmmc_host *host = dev_id;
> +     unsigned long flags;
> +
> +     /* cirq is level triggered, disable to avoid infinite loop */
> +     spin_lock_irqsave(&host->irq_lock, flags);

Do you need to save restore flags here? IRQ is already disabled since
you're in hard IRQ context so spin_lock() seems sufficient.

> +     if (host->flags & HSMMC_WAKE_IRQ_ENABLED) {
> +             disable_irq_nosync(host->wake_irq);
> +             host->flags &= ~HSMMC_WAKE_IRQ_ENABLED;
> +     }
> +     spin_unlock_irqrestore(&host->irq_lock, flags);

spin_unlock() seems sufficient.

regards,
-Joel


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" 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