Re: [PATCH v2] mmc: atmel-mci: use probe deferring if dma controller is not ready yet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 19, 2014 at 03:57:56PM +0100, Arnd Bergmann wrote:
> On Wednesday 19 November 2014 15:51:07 Ludovic Desroches wrote:
> > @@ -2265,37 +2265,39 @@ static void atmci_cleanup_slot(struct atmel_mci_slot *slot,
> >         mmc_free_host(slot->mmc);
> >  }
> >  
> > -static bool atmci_configure_dma(struct atmel_mci *host)
> > +static int atmci_configure_dma(struct atmel_mci *host)
> >  {
> >         struct mci_platform_data        *pdata;
> >         dma_cap_mask_t mask;
> > +       int ret = 0;
> >  
> >         if (host == NULL)
> > -               return false;
> > +               return -EINVAL;
> >  
> >         pdata = host->pdev->dev.platform_data;
> >  
> >         dma_cap_zero(mask);
> >         dma_cap_set(DMA_SLAVE, mask);
> >  
> > 
> 
> Host can't be NULL here, the only caller has already checked and dereferenced
> the pointer before calling atmci_configure_dma.
> 
> The mask variable is now completely unused and can be removed.

Thanks, there is some extra stuff that can be removed too. I'll split
those changes in two patches, one to remove all non DT DMA stuff and one
for probe deferring.

Ludovic
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux