Re: [PATCH/RFC] spi: Fix device unregistration when unregistering the bus master

2011-12-06 Thread Linus Walleij
On Tue, Dec 6, 2011 at 5:22 PM, Laurent Pinchart wrote: > Hi Linus, >> 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 b

Re: [PATCH/RFC] spi: Fix device unregistration when unregistering the bus master

2011-12-06 Thread Laurent Pinchart
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

Re: [PATCH/RFC] spi: Fix device unregistration when unregistering the bus master

2011-12-02 Thread Linus Walleij
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 sibli

[PATCH/RFC] spi: Fix device unregistration when unregistering the bus master

2011-11-28 Thread Laurent Pinchart
Device are added as children of the bus master's parent device, but spi_unregister_master() looks for devices to unregister in the bus master's children. This results in the child devices not being unregistered. Fix this by iterating over the bus master's parent device when unregistering the maste