Re: [PATCH] staging/nvec: Pass proper resource to mfd_add_devices()

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

 



On Mon, Jul 21, 2014 at 10:01:36PM +0200, Marc Dietrich wrote:
> Hi Thierry,
> 
> On Mon, 21 Jul 2014 13:52:41 +0200
> Thierry Reding <thierry.reding@xxxxxxxxx> wrote:
> 
> > From: Thierry Reding <treding@xxxxxxxxxx>
> > 
> > The mfd_add_devices() parameter takes a struct resource * as fifth
> > argument, but the nvec driver passes in a void __iomem *. The driver
> > gets away with it because none of the subdevices ever directly access
> > the registers.
> 
> you are right, this one looked bogus. 
> 
> > While at it, use platform_get_irq() instead of platform_get_resource()
> > to get the device's interrupt. This makes it easier to pass in the
> > register region since the variable is no longer reused.
> > 
> > Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
> > ---
> > Alternatively we could simply pass NULL into mfd_add_devices(), which
> > might be a slightly more accurate representation of what's going on.
> >
> > Marc, Greg, any preferences?
> 
> I just tested with NULL as base and it seems to produce no harm. Even
> if we may get rid of mfd_add_devices in the future, passing NULL is
> cleaner for now and no children will ever make use of it. So please send
> a new version with this change.
> 
> Otherwise, thanks for looking and cleaning up.

Ok, can I get your ack for this patch then?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux