2009/12/9 Uwe Kleine-König <[email protected]>: > On Tue, Dec 08, 2009 at 05:34:21PM -0700, Grant Likely wrote: >> Hi Uwe. >> >> On Tue, Dec 8, 2009 at 4:30 PM, <[email protected]> wrote: >> > Subject: spi-imx: use platform_driver_probe as probe lives in .init.text >> > From: Uwe Kleine-König <[email protected]> >> > >> > Using platform_driver_register with a probe function defined using __init >> > is wrong. >> > >> > This fixes an oops after: >> > >> > cd /sys/bus/platform/drivers/spi_imx >> > echo -n spi_imx.0 > unbind >> > echo -n spi_imx.0 > bind >> > >> > Signed-off-by: Uwe Kleine-König <[email protected]> >> > Cc: David Brownell <[email protected]> >> > Cc: Daniel Mack <[email protected]> >> > Cc: Sascha Hauer <[email protected]> >> > Cc: Grant Likely <[email protected]> >> > Signed-off-by: Andrew Morton <[email protected]> >> > --- >> > >> > drivers/spi/spi_imx.c | 3 +-- >> > 1 file changed, 1 insertion(+), 2 deletions(-) >> > >> > diff -puN >> > drivers/spi/spi_imx.c~spi-imx-use-platform_driver_probe-as-probe-lives-in-inittext >> > drivers/spi/spi_imx.c >> > --- >> > a/drivers/spi/spi_imx.c~spi-imx-use-platform_driver_probe-as-probe-lives-in-inittext >> > +++ a/drivers/spi/spi_imx.c >> > @@ -666,13 +666,12 @@ static struct platform_driver spi_imx_dr >> > .name = DRIVER_NAME, >> > .owner = THIS_MODULE, >> > }, >> > - .probe = spi_imx_probe, >> > .remove = __exit_p(spi_imx_remove), >> >> This looks wrong. Why can't spi_imx_probe and spi_imx_remove be >> changed to be __devinit and __devexit? > I don't care much, but I thought this to be in accordance to > > d1e44d9 (SPI driver runtime footprint shrinkage) > > (http://git.kernel.org/linus/d1e44d9). I have a whole bunch of such > patches and already sent it three times (I think). There is no > accordance in the community that one of the two possibilities is better > than the other.
hmmm. I don't like the pattern, but I'm not going to reject it out of hand. Let me think about it for a bit. g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ spi-devel-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spi-devel-general
