Hi Linus,

On Friday 02 December 2011 13:14:31 Linus Walleij wrote:
> On Mon, Nov 28, 2011 at 2:23 PM, Laurent Pinchart wrote:
> > I'm not too familiar with the way the SPI subsystem plugs its devices in
> > the Linux device model, so I'm not sure what the right fix is. An
> > alternative would be to register the SPI devices as children of the SPI
> > master, not as siblings.
> 
> I think that is actually the right solution, so the bug is in
> spi_alloc_device() where it sets:
> 
>         struct spi_device       *spi;
>         struct device           *dev = master->dev.parent;
> 
> The latter should be:
> 
>         struct device           *dev = master->dev;
> 
> Just my €0.01...

I agree with you, that was my initial approach as well. However, it changes 
the parent-child relationships and might break applications relying on that 
relationship in sysfs for instance. Would that be acceptable ?

-- 
Regards,

Laurent Pinchart

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to