Re: dev->of_node overwrite can cause device loading with different driver

2013-09-18 Thread Lothar Waßmann
Hi, Markus Pargmann writes: > On Sat, Sep 14, 2013 at 01:28:09PM +0100, Russell King - ARM Linux wrote: > > On Sat, Sep 14, 2013 at 05:17:29AM -0700, Greg Kroah-Hartman wrote: > > > On Sat, Sep 14, 2013 at 09:16:53AM +0200, Markus Pargmann wrote: > > > > 3. We could fix up all drivers that change

Re: dev->of_node overwrite can cause device loading with different driver

2013-09-18 Thread Markus Pargmann
On Sat, Sep 14, 2013 at 12:20:56PM +0100, Russell King - ARM Linux wrote: > On Sat, Sep 14, 2013 at 09:16:53AM +0200, Markus Pargmann wrote: > > I think there are three options to solve this: > > > > 1. Break out of the driver list iteration loop as soon as a driver probe > >function fails.

Re: dev->of_node overwrite can cause device loading with different driver

2013-09-18 Thread Markus Pargmann
On Sat, Sep 14, 2013 at 01:28:09PM +0100, Russell King - ARM Linux wrote: > On Sat, Sep 14, 2013 at 05:17:29AM -0700, Greg Kroah-Hartman wrote: > > On Sat, Sep 14, 2013 at 09:16:53AM +0200, Markus Pargmann wrote: > > > 3. We could fix up all drivers that change the of_node. But there are > > >

Re: dev-of_node overwrite can cause device loading with different driver

2013-09-18 Thread Markus Pargmann
On Sat, Sep 14, 2013 at 01:28:09PM +0100, Russell King - ARM Linux wrote: On Sat, Sep 14, 2013 at 05:17:29AM -0700, Greg Kroah-Hartman wrote: On Sat, Sep 14, 2013 at 09:16:53AM +0200, Markus Pargmann wrote: 3. We could fix up all drivers that change the of_node. But there are ARM DT

Re: dev-of_node overwrite can cause device loading with different driver

2013-09-18 Thread Markus Pargmann
On Sat, Sep 14, 2013 at 12:20:56PM +0100, Russell King - ARM Linux wrote: On Sat, Sep 14, 2013 at 09:16:53AM +0200, Markus Pargmann wrote: I think there are three options to solve this: 1. Break out of the driver list iteration loop as soon as a driver probe function fails. This way

Re: dev-of_node overwrite can cause device loading with different driver

2013-09-18 Thread Lothar Waßmann
Hi, Markus Pargmann writes: On Sat, Sep 14, 2013 at 01:28:09PM +0100, Russell King - ARM Linux wrote: On Sat, Sep 14, 2013 at 05:17:29AM -0700, Greg Kroah-Hartman wrote: On Sat, Sep 14, 2013 at 09:16:53AM +0200, Markus Pargmann wrote: 3. We could fix up all drivers that change the

Re: dev->of_node overwrite can cause device loading with different driver

2013-09-15 Thread Russell King - ARM Linux
On Sat, Sep 14, 2013 at 05:17:29AM -0700, Greg Kroah-Hartman wrote: > On Sat, Sep 14, 2013 at 09:16:53AM +0200, Markus Pargmann wrote: > > 3. We could fix up all drivers that change the of_node. But there are > >ARM DT frameworks that require a device struct as parameter instead > >of a

Re: dev->of_node overwrite can cause device loading with different driver

2013-09-15 Thread Russell King - ARM Linux
On Sat, Sep 14, 2013 at 09:16:53AM +0200, Markus Pargmann wrote: > I think there are three options to solve this: > > 1. Break out of the driver list iteration loop as soon as a driver probe >function fails. This way there is no possibility for another driver >to be probed with a device

Re: dev-of_node overwrite can cause device loading with different driver

2013-09-15 Thread Russell King - ARM Linux
On Sat, Sep 14, 2013 at 09:16:53AM +0200, Markus Pargmann wrote: I think there are three options to solve this: 1. Break out of the driver list iteration loop as soon as a driver probe function fails. This way there is no possibility for another driver to be probed with a device struct

Re: dev-of_node overwrite can cause device loading with different driver

2013-09-15 Thread Russell King - ARM Linux
On Sat, Sep 14, 2013 at 05:17:29AM -0700, Greg Kroah-Hartman wrote: On Sat, Sep 14, 2013 at 09:16:53AM +0200, Markus Pargmann wrote: 3. We could fix up all drivers that change the of_node. But there are ARM DT frameworks that require a device struct as parameter instead of a

Re: dev->of_node overwrite can cause device loading with different driver

2013-09-14 Thread Greg Kroah-Hartman
On Sat, Sep 14, 2013 at 09:16:53AM +0200, Markus Pargmann wrote: > > Ok, so what do you suggest we do for stuff like this? Fix up the musb > > driver? Or something else? > > I think there are three options to solve this: > > 1. Break out of the driver list iteration loop as soon as a driver

Re: dev->of_node overwrite can cause device loading with different driver

2013-09-14 Thread Markus Pargmann
On Fri, Sep 13, 2013 at 10:10:46AM -0700, Greg Kroah-Hartman wrote: > On Fri, Sep 13, 2013 at 05:53:31PM +0200, Markus Pargmann wrote: > > Hi, > > > > I ran into a serious problem with overwriting device of_node property as > > it is done in many drivers for ARM. If probing fails in such a > >

Re: dev-of_node overwrite can cause device loading with different driver

2013-09-14 Thread Markus Pargmann
On Fri, Sep 13, 2013 at 10:10:46AM -0700, Greg Kroah-Hartman wrote: On Fri, Sep 13, 2013 at 05:53:31PM +0200, Markus Pargmann wrote: Hi, I ran into a serious problem with overwriting device of_node property as it is done in many drivers for ARM. If probing fails in such a situation,

Re: dev-of_node overwrite can cause device loading with different driver

2013-09-14 Thread Greg Kroah-Hartman
On Sat, Sep 14, 2013 at 09:16:53AM +0200, Markus Pargmann wrote: Ok, so what do you suggest we do for stuff like this? Fix up the musb driver? Or something else? I think there are three options to solve this: 1. Break out of the driver list iteration loop as soon as a driver probe

Re: dev->of_node overwrite can cause device loading with different driver

2013-09-13 Thread Greg Kroah-Hartman
On Fri, Sep 13, 2013 at 05:53:31PM +0200, Markus Pargmann wrote: > Hi, > > I ran into a serious problem with overwriting device of_node property as > it is done in many drivers for ARM. If probing fails in such a > situation, the device could be loaded with a different driver. > > This is an

Re: dev-of_node overwrite can cause device loading with different driver

2013-09-13 Thread Greg Kroah-Hartman
On Fri, Sep 13, 2013 at 05:53:31PM +0200, Markus Pargmann wrote: Hi, I ran into a serious problem with overwriting device of_node property as it is done in many drivers for ARM. If probing fails in such a situation, the device could be loaded with a different driver. This is an example