* [PATCH 01/58] move acornfb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 02/58] move am79c961's " Uwe Kleine-König
` (56 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Christoph Hellwig, Antonino Daplas,
linux-fbdev-devel
A pointer to acornfb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: linux-fbdev-devel@lists.sourceforge.net
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/acornfb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c
index 61c3d3f..19e4b21 100644
--- a/drivers/video/acornfb.c
+++ b/drivers/video/acornfb.c
@@ -1259,7 +1259,7 @@ free_unused_pages(unsigned int virtual_start, unsigned int virtual_end)
printk("acornfb: freed %dK memory\n", mb_freed);
}
-static int __init acornfb_probe(struct platform_device *dev)
+static int __devinit acornfb_probe(struct platform_device *dev)
{
unsigned long size;
u_int h_sync, v_sync;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 02/58] move am79c961's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 01/58] move acornfb's probe function to .devinit.text Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 03/58] move arcfb's " Uwe Kleine-König
` (55 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Roel Kluin, Russell King, netdev
A pointer to am79c961_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Roel Kluin <12o3l@tiscali.nl>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: netdev@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/arm/am79c961a.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c
index c2d012f..91d6a18 100644
--- a/drivers/net/arm/am79c961a.c
+++ b/drivers/net/arm/am79c961a.c
@@ -666,7 +666,7 @@ static void __init am79c961_banner(void)
printk(KERN_INFO "%s", version);
}
-static int __init am79c961_probe(struct platform_device *pdev)
+static int __devinit am79c961_probe(struct platform_device *pdev)
{
struct resource *res;
struct net_device *dev;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 03/58] move arcfb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 01/58] move acornfb's probe function to .devinit.text Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 02/58] move am79c961's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 04/58] move at91_ether's " Uwe Kleine-König
` (54 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Antonino Daplas
A pointer to arcfb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/arcfb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c
index c343169..01554d6 100644
--- a/drivers/video/arcfb.c
+++ b/drivers/video/arcfb.c
@@ -504,7 +504,7 @@ static struct fb_ops arcfb_ops = {
.fb_ioctl = arcfb_ioctl,
};
-static int __init arcfb_probe(struct platform_device *dev)
+static int __devinit arcfb_probe(struct platform_device *dev)
{
struct fb_info *info;
int retval = -ENOMEM;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 04/58] move at91_ether's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (2 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 03/58] move arcfb's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-28 0:09 ` David Brownell
2009-03-27 23:26 ` [PATCH 05/58] move at91_wdt's probe function to .devinit.text Uwe Kleine-König
` (53 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, David S. Miller, David Brownell, Jeff Garzik,
Paulius Zaleckas, Marc Pignat, Andrew Victor, Roel Kluin
A pointer to at91ether_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Cc: Marc Pignat <marc.pignat@hevs.ch>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Roel Kluin <12o3l@tiscali.nl>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/arm/at91_ether.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index 442938d..52e09eb 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -1113,7 +1113,7 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
/*
* Detect MAC and PHY and perform initialization
*/
-static int __init at91ether_probe(struct platform_device *pdev)
+static int __devinit at91ether_probe(struct platform_device *pdev)
{
unsigned int phyid1, phyid2;
int detected = -1;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 04/58] move at91_ether's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 04/58] move at91_ether's " Uwe Kleine-König
@ 2009-03-28 0:09 ` David Brownell
2009-03-28 6:32 ` Uwe Kleine-König
0 siblings, 1 reply; 100+ messages in thread
From: David Brownell @ 2009-03-28 0:09 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, David S. Miller, Jeff Garzik,
Paulius Zaleckas, Marc Pignat, Andrew Victor, Roel Kluin
On Friday 27 March 2009, Uwe Kleine-König wrote:
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
IMO that's preferable for this driver. There's no
point in doing anything other than discarding the
probe() method after the driver has been set up;
it'd be doing nothing except wasting memory.
Same thing for ... pretty much all other drivers
for SoC platform devices.
In this series, you cc'd me on four OMAP drivers
(mmci-omap, mmci-omap-hs, omap-rng, omap_udc) which
I *know* that's a completely workable -- and far
preferable -- solution. There might be others.
^ permalink raw reply [flat|nested] 100+ messages in thread
* Re: [PATCH 04/58] move at91_ether's probe function to .devinit.text
2009-03-28 0:09 ` David Brownell
@ 2009-03-28 6:32 ` Uwe Kleine-König
2009-03-28 16:27 ` David Brownell
0 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-28 6:32 UTC (permalink / raw)
To: David Brownell
Cc: linux-kernel, Andrew Morton, David S. Miller, Jeff Garzik,
Paulius Zaleckas, Marc Pignat, Andrew Victor, Roel Kluin
Hi David,
On Fri, Mar 27, 2009 at 05:09:37PM -0700, David Brownell wrote:
> On Friday 27 March 2009, Uwe Kleine-König wrote:
> > An alternative to this patch is using platform_driver_probe instead of
> > platform_driver_register plus removing the pointer to the probe function
> > from the struct platform_driver.
>
> IMO that's preferable for this driver. There's no
> point in doing anything other than discarding the
> probe() method after the driver has been set up;
> it'd be doing nothing except wasting memory.
>
> Same thing for ... pretty much all other drivers
> for SoC platform devices.
>
> In this series, you cc'd me on four OMAP drivers
> (mmci-omap, mmci-omap-hs, omap-rng, omap_udc) which
> I *know* that's a completely workable -- and far
> preferable -- solution. There might be others.
So if I convert them to the alternative fix, you volunteer to test these
patches? (Or at least provide your Tested-and-Acked-by:?)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 100+ messages in thread
* Re: [PATCH 04/58] move at91_ether's probe function to .devinit.text
2009-03-28 6:32 ` Uwe Kleine-König
@ 2009-03-28 16:27 ` David Brownell
2009-04-02 17:47 ` [PATCH] make mmci-omap using platform_driver_probe Uwe Kleine-König
0 siblings, 1 reply; 100+ messages in thread
From: David Brownell @ 2009-03-28 16:27 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, David S. Miller, Jeff Garzik,
Paulius Zaleckas, Marc Pignat, Andrew Victor, Roel Kluin
On Friday 27 March 2009, Uwe Kleine-König wrote:
>
> > In this series, you cc'd me on four OMAP drivers
> > (mmci-omap, mmci-omap-hs, omap-rng, omap_udc) which
> > I *know* that's a completely workable -- and far
> > preferable -- solution. There might be others.
>
> So if I convert them to the alternative fix, you volunteer to test these
> patches? (Or at least provide your Tested-and-Acked-by:?)
Sure, those four plus at91_ether. I've got that hardware
sitting around, and it's just build-and-boot.
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH] make mmci-omap using platform_driver_probe
2009-03-28 16:27 ` David Brownell
@ 2009-04-02 17:47 ` Uwe Kleine-König
2009-04-02 17:51 ` Uwe Kleine-König
` (2 more replies)
0 siblings, 3 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-04-02 17:47 UTC (permalink / raw)
To: linux-kernel, linux-kernel
Cc: Grazvydas Ignotas, Pierre Ossman, David Brownell, Tony Lindgren,
Russell King, Paul Walmsley, Jarkko Lavinen, Hiroshi DOYU,
Kyungmin Park, Carlos Eduardo Aguiar, Andrew Morton
A pointer to mmc_omap_probe which lives in .init.text is passed to the
core via platform_driver_register and so the kernel might oops if probe
is called after the init code is discarded.
As requested by David Brownell platform_driver_probe is used instead of
moving the probe function to .devinit.text. This saves some memory, but
might have the downside that a device being registered after the call to
mmc_omap_init but before the init sections are discarded will not be
bound anymore to the driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Grazvydas Ignotas <notasas@gmail.com>
Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/mmc/host/omap.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 67d7b7f..004080e 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1601,7 +1601,6 @@ static int mmc_omap_resume(struct platform_device *pdev)
#endif
static struct platform_driver mmc_omap_driver = {
- .probe = mmc_omap_probe,
.remove = mmc_omap_remove,
.suspend = mmc_omap_suspend,
.resume = mmc_omap_resume,
@@ -1613,7 +1612,7 @@ static struct platform_driver mmc_omap_driver = {
static int __init mmc_omap_init(void)
{
- return platform_driver_register(&mmc_omap_driver);
+ return platform_driver_probe(&mmc_omap_driver, mmc_omap_probe);
}
static void __exit mmc_omap_exit(void)
--
tg: (5d80f8e..) t/platsection/mmc_omap_driver (depends on: linus/master)
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH] make mmci-omap using platform_driver_probe
2009-04-02 17:47 ` [PATCH] make mmci-omap using platform_driver_probe Uwe Kleine-König
@ 2009-04-02 17:51 ` Uwe Kleine-König
2009-04-16 20:53 ` David Brownell
2009-04-28 19:27 ` Pierre Ossman
2 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-04-02 17:51 UTC (permalink / raw)
To: linux-kernel
Cc: Grazvydas Ignotas, Pierre Ossman, David Brownell, Tony Lindgren,
Russell King, Paul Walmsley, Jarkko Lavinen, Hiroshi DOYU,
Kyungmin Park, Carlos Eduardo Aguiar, Andrew Morton
Hello,
Ups, sorry, I got the In-Reply-To wrong. This should have been a reply
to <1238196439-16535-27-git-send-email-u.kleine-koenig@pengutronix.de>.
Best regards
Uwe
On Thu, Apr 02, 2009 at 07:47:41PM +0200, Uwe Kleine-König wrote:
> A pointer to mmc_omap_probe which lives in .init.text is passed to the
> core via platform_driver_register and so the kernel might oops if probe
> is called after the init code is discarded.
>
> As requested by David Brownell platform_driver_probe is used instead of
> moving the probe function to .devinit.text. This saves some memory, but
> might have the downside that a device being registered after the call to
> mmc_omap_init but before the init sections are discarded will not be
> bound anymore to the driver.
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 100+ messages in thread
* Re: [PATCH] make mmci-omap using platform_driver_probe
2009-04-02 17:47 ` [PATCH] make mmci-omap using platform_driver_probe Uwe Kleine-König
2009-04-02 17:51 ` Uwe Kleine-König
@ 2009-04-16 20:53 ` David Brownell
2009-04-28 19:27 ` Pierre Ossman
2 siblings, 0 replies; 100+ messages in thread
From: David Brownell @ 2009-04-16 20:53 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Grazvydas Ignotas, Pierre Ossman, Tony Lindgren,
Russell King, Paul Walmsley, Jarkko Lavinen, Hiroshi DOYU,
Kyungmin Park, Carlos Eduardo Aguiar, Andrew Morton
On Thursday 02 April 2009, Uwe Kleine-König wrote:
> A pointer to mmc_omap_probe which lives in .init.text is passed to the
> core via platform_driver_register and so the kernel might oops if probe
> is called after the init code is discarded.
>
> As requested by David Brownell platform_driver_probe is used instead of
> moving the probe function to .devinit.text. This saves some memory, but
> might have the downside that a device being registered after the call to
> mmc_omap_init but before the init sections are discarded will not be
> bound anymore to the driver.
One of the reasons I said to do it that way is that we *KNOW* it is
safe for thiis driver. That's a non-issue; no downside.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Grazvydas Ignotas <notasas@gmail.com>
> Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>
> Cc: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com>
> Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
> Cc: Andrew Morton <akpm@linux-foundation.org>
>
> ---
> drivers/mmc/host/omap.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
> index 67d7b7f..004080e 100644
> --- a/drivers/mmc/host/omap.c
> +++ b/drivers/mmc/host/omap.c
> @@ -1601,7 +1601,6 @@ static int mmc_omap_resume(struct platform_device *pdev)
> #endif
>
> static struct platform_driver mmc_omap_driver = {
> - .probe = mmc_omap_probe,
> .remove = mmc_omap_remove,
> .suspend = mmc_omap_suspend,
> .resume = mmc_omap_resume,
> @@ -1613,7 +1612,7 @@ static struct platform_driver mmc_omap_driver = {
>
> static int __init mmc_omap_init(void)
> {
> - return platform_driver_register(&mmc_omap_driver);
> + return platform_driver_probe(&mmc_omap_driver, mmc_omap_probe);
> }
>
> static void __exit mmc_omap_exit(void)
> --
> tg: (5d80f8e..) t/platsection/mmc_omap_driver (depends on: linus/master)
>
>
^ permalink raw reply [flat|nested] 100+ messages in thread* Re: [PATCH] make mmci-omap using platform_driver_probe
2009-04-02 17:47 ` [PATCH] make mmci-omap using platform_driver_probe Uwe Kleine-König
2009-04-02 17:51 ` Uwe Kleine-König
2009-04-16 20:53 ` David Brownell
@ 2009-04-28 19:27 ` Pierre Ossman
2009-04-28 22:11 ` David Brownell
2 siblings, 1 reply; 100+ messages in thread
From: Pierre Ossman @ 2009-04-28 19:27 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Grazvydas Ignotas, David Brownell, Tony Lindgren,
Russell King, Paul Walmsley, Jarkko Lavinen, Hiroshi DOYU,
Kyungmin Park, Carlos Eduardo Aguiar, Andrew Morton
On Thu, 2 Apr 2009 19:47:41 +0200
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> A pointer to mmc_omap_probe which lives in .init.text is passed to the
> core via platform_driver_register and so the kernel might oops if probe
> is called after the init code is discarded.
>
> As requested by David Brownell platform_driver_probe is used instead of
> moving the probe function to .devinit.text. This saves some memory, but
> might have the downside that a device being registered after the call to
> mmc_omap_init but before the init sections are discarded will not be
> bound anymore to the driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Grazvydas Ignotas <notasas@gmail.com>
> Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>
> Cc: David Brownell <dbrownell@users.sourceforge.net>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com>
> Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
> Cc: Andrew Morton <akpm@linux-foundation.org>
>
> ---
Queued.
Rgds
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
rdesktop, core developer http://www.rdesktop.org
TigerVNC, core developer http://www.tigervnc.org
WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
^ permalink raw reply [flat|nested] 100+ messages in thread* Re: [PATCH] make mmci-omap using platform_driver_probe
2009-04-28 19:27 ` Pierre Ossman
@ 2009-04-28 22:11 ` David Brownell
0 siblings, 0 replies; 100+ messages in thread
From: David Brownell @ 2009-04-28 22:11 UTC (permalink / raw)
To: Pierre Ossman, Uwe Kleine-König
Cc: linux-kernel, Grazvydas Ignotas, Tony Lindgren, Russell King,
Paul Walmsley, Jarkko Lavinen, Hiroshi DOYU, Kyungmin Park,
Carlos Eduardo Aguiar, Andrew Morton
On Tuesday 28 April 2009, Pierre Ossman wrote:
> >
> > As requested by David Brownell platform_driver_probe is used instead of
> > moving the probe function to .devinit.text. This saves some memory, but
> > might have the downside that a device being registered after the call to
> > mmc_omap_init but before the init sections are discarded will not be
> > bound anymore to the driver.
However, as I noted that *does not happen* ... so, no worries.
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 05/58] move at91_wdt's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (3 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 04/58] move at91_ether's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 06/58] move bf54x-lq043's " Uwe Kleine-König
` (52 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Andrew Victor, Russell King,
Jean-Christophe PLAGNIOL-VILLARD, Ilpo Jarvinen, Wim Van Sebroeck
A pointer to at91wdt_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Ilpo Jarvinen <ilpo.jarvinen@helsinki.fi>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/watchdog/at91rm9200_wdt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c
index e35d545..ee82323 100644
--- a/drivers/watchdog/at91rm9200_wdt.c
+++ b/drivers/watchdog/at91rm9200_wdt.c
@@ -197,7 +197,7 @@ static struct miscdevice at91wdt_miscdev = {
.fops = &at91wdt_fops,
};
-static int __init at91wdt_probe(struct platform_device *pdev)
+static int __devinit at91wdt_probe(struct platform_device *pdev)
{
int res;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 06/58] move bf54x-lq043's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (4 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 05/58] move at91_wdt's probe function to .devinit.text Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 07/58] move cfag12864bfb's " Uwe Kleine-König
` (51 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Bryan Wu, Michael Hennerich, Mike Frysinger,
Krzysztof Helt, Geert Uytterhoeven, Antonino Daplas
A pointer to bfin_bf54x_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Antonino Daplas <adaplas@pol.net>
---
drivers/video/bf54x-lq043fb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
index 37e60b1..0a848c0 100644
--- a/drivers/video/bf54x-lq043fb.c
+++ b/drivers/video/bf54x-lq043fb.c
@@ -530,7 +530,7 @@ static irqreturn_t bfin_bf54x_irq_error(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static int __init bfin_bf54x_probe(struct platform_device *pdev)
+static int __devinit bfin_bf54x_probe(struct platform_device *pdev)
{
struct bfin_bf54xfb_info *info;
struct fb_info *fbinfo;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 07/58] move cfag12864bfb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (5 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 06/58] move bf54x-lq043's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-28 18:43 ` Miguel Ojeda
2009-03-27 23:26 ` [PATCH 08/58] move leds-clevo-mail's " Uwe Kleine-König
` (50 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Miguel Ojeda, Avuton Olrich, Antonino Daplas
A pointer to cfag12864bfb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Avuton Olrich <avuton@gmail.com>
Cc: Antonino Daplas <adaplas@gmail.com>
---
drivers/auxdisplay/cfag12864bfb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c
index fe3a865..b0ca5a4 100644
--- a/drivers/auxdisplay/cfag12864bfb.c
+++ b/drivers/auxdisplay/cfag12864bfb.c
@@ -81,7 +81,7 @@ static struct fb_ops cfag12864bfb_ops = {
.fb_mmap = cfag12864bfb_mmap,
};
-static int __init cfag12864bfb_probe(struct platform_device *device)
+static int __devinit cfag12864bfb_probe(struct platform_device *device)
{
int ret = -EINVAL;
struct fb_info *info = framebuffer_alloc(0, &device->dev);
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 07/58] move cfag12864bfb's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 07/58] move cfag12864bfb's " Uwe Kleine-König
@ 2009-03-28 18:43 ` Miguel Ojeda
0 siblings, 0 replies; 100+ messages in thread
From: Miguel Ojeda @ 2009-03-28 18:43 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Avuton Olrich, Antonino Daplas
2009/3/27 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> A pointer to cfag12864bfb_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
ACK, thank you!
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Avuton Olrich <avuton@gmail.com>
> Cc: Antonino Daplas <adaplas@gmail.com>
> ---
> drivers/auxdisplay/cfag12864bfb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c
> index fe3a865..b0ca5a4 100644
> --- a/drivers/auxdisplay/cfag12864bfb.c
> +++ b/drivers/auxdisplay/cfag12864bfb.c
> @@ -81,7 +81,7 @@ static struct fb_ops cfag12864bfb_ops = {
> .fb_mmap = cfag12864bfb_mmap,
> };
>
> -static int __init cfag12864bfb_probe(struct platform_device *device)
> +static int __devinit cfag12864bfb_probe(struct platform_device *device)
> {
> int ret = -EINVAL;
> struct fb_info *info = framebuffer_alloc(0, &device->dev);
> --
> 1.6.2
>
>
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 08/58] move leds-clevo-mail's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (6 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 07/58] move cfag12864bfb's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 09/58] move cobalt-lcd's " Uwe Kleine-König
` (49 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Richard Purdie, Márton Németh
A pointer to clevo_mail_led_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Richard Purdie <rpurdie@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Márton Németh <nm127@freemail.hu>
---
drivers/leds/leds-clevo-mail.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
index 1813c84..8ee83ce 100644
--- a/drivers/leds/leds-clevo-mail.c
+++ b/drivers/leds/leds-clevo-mail.c
@@ -145,7 +145,7 @@ static struct led_classdev clevo_mail_led = {
.flags = LED_CORE_SUSPENDRESUME,
};
-static int __init clevo_mail_led_probe(struct platform_device *pdev)
+static int __devinit clevo_mail_led_probe(struct platform_device *pdev)
{
return led_classdev_register(&pdev->dev, &clevo_mail_led);
}
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 09/58] move cobalt-lcd's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (7 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 08/58] move leds-clevo-mail's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-28 10:43 ` Ralf Baechle
2009-03-27 23:26 ` [PATCH 10/58] move corgi-ssp's " Uwe Kleine-König
` (48 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Yoichi Yuasa, Krzysztof Helt, Antonino Daplas,
Ralf Baechle
A pointer to cobalt_lcdfb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/cobalt_lcdfb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/cobalt_lcdfb.c b/drivers/video/cobalt_lcdfb.c
index 7bad24e..5ef3a0f 100644
--- a/drivers/video/cobalt_lcdfb.c
+++ b/drivers/video/cobalt_lcdfb.c
@@ -287,7 +287,7 @@ static struct fb_ops cobalt_lcd_fbops = {
.fb_cursor = cobalt_lcdfb_cursor,
};
-static int __init cobalt_lcdfb_probe(struct platform_device *dev)
+static int __devinit cobalt_lcdfb_probe(struct platform_device *dev)
{
struct fb_info *info;
struct resource *res;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 09/58] move cobalt-lcd's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 09/58] move cobalt-lcd's " Uwe Kleine-König
@ 2009-03-28 10:43 ` Ralf Baechle
0 siblings, 0 replies; 100+ messages in thread
From: Ralf Baechle @ 2009-03-28 10:43 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Yoichi Yuasa, Krzysztof Helt,
Antonino Daplas
On Sat, Mar 28, 2009 at 12:26:30AM +0100, Uwe Kleine-König wrote:
> A pointer to cobalt_lcdfb_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
> Cc: Antonino Daplas <adaplas@pol.net>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Ralf
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 10/58] move corgi-ssp's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (8 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 09/58] move cobalt-lcd's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-28 9:31 ` Eric Miao
2009-03-27 23:26 ` [PATCH 11/58] move efifb's " Uwe Kleine-König
` (47 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Eric Miao, Russell King, Paul Sokolovsky,
Richard Purdie, Liam Girdwood
A pointer to corgi_ssp_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (when having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Eric Miao <eric.miao@marvell.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Paul Sokolovsky <pmiscml@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
arch/arm/mach-pxa/corgi_ssp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c
index 8e2f221..0565960 100644
--- a/arch/arm/mach-pxa/corgi_ssp.c
+++ b/arch/arm/mach-pxa/corgi_ssp.c
@@ -205,7 +205,7 @@ void __init corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo)
ssp_machinfo = machinfo;
}
-static int __init corgi_ssp_probe(struct platform_device *dev)
+static int __devinit corgi_ssp_probe(struct platform_device *dev)
{
int ret;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 10/58] move corgi-ssp's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 10/58] move corgi-ssp's " Uwe Kleine-König
@ 2009-03-28 9:31 ` Eric Miao
0 siblings, 0 replies; 100+ messages in thread
From: Eric Miao @ 2009-03-28 9:31 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Eric Miao, Russell King,
Paul Sokolovsky, Richard Purdie, Liam Girdwood
2009/3/28 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> A pointer to corgi_ssp_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (when having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
These files are supposed to be deprecated and I'm planning to remove
them once drivers/input/touchscreen/corgi-ts.c begins its migration to
ads7846.c (with a posted fix currently queued in the -mm tree). Other
than corgi-ts.c, there will be no reference to them.
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 11/58] move efifb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (9 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 10/58] move corgi-ssp's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 12/58] move orion-ehci's " Uwe Kleine-König
` (46 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Peter Jones, Krzysztof Helt, Geert Uytterhoeven,
Jaya Kumar, Ralf Baechle, Maciej W. Rozycki,
Chandramouli Narayanan, Huang Ying
A pointer to efifb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Peter Jones <pjones@redhat.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Jaya Kumar <jayakumar.lkml@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Chandramouli Narayanan <mouli@linux.intel.com>
Cc: Huang Ying <ying.huang@intel.com>
---
drivers/video/efifb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index daf9b81..94b2e4c 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -199,7 +199,7 @@ static int __init efifb_setup(char *options)
return 0;
}
-static int __init efifb_probe(struct platform_device *dev)
+static int __devinit efifb_probe(struct platform_device *dev)
{
struct fb_info *info;
int err;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 12/58] move orion-ehci's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (10 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 11/58] move efifb's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 13/58] move epson1355fb's " Uwe Kleine-König
` (45 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Ronen Shitrit, Lennert Buytenhek,
Greg Kroah-Hartman, Alan Stern, David Brownell, Nicolas Pitre,
Russell King, Tzachi Perelstein
A pointer to ehci_orion_drv_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Ronen Shitrit <rshitrit@marvell.com>
Cc: Lennert Buytenhek <buytenh@marvell.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Cc: Nicolas Pitre <nico@marvell.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Tzachi Perelstein <tzachi@marvell.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/usb/host/ehci-orion.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index 9d48790..17dc154 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -187,7 +187,7 @@ ehci_orion_conf_mbus_windows(struct usb_hcd *hcd,
}
}
-static int __init ehci_orion_drv_probe(struct platform_device *pdev)
+static int __devinit ehci_orion_drv_probe(struct platform_device *pdev)
{
struct orion_ehci_data *pd = pdev->dev.platform_data;
struct resource *res;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 13/58] move epson1355fb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (11 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 12/58] move orion-ehci's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 14/58] move sh_flctl's " Uwe Kleine-König
` (44 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Russell King, Krzysztof Helt, Antonino Daplas,
Paul Mundt, Roland Stigge, Greg Kroah-Hartman
A pointer to epson1355fb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/video/epson1355fb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c
index 2735b79..6d755bb 100644
--- a/drivers/video/epson1355fb.c
+++ b/drivers/video/epson1355fb.c
@@ -602,7 +602,7 @@ static int epson1355fb_remove(struct platform_device *dev)
return 0;
}
-int __init epson1355fb_probe(struct platform_device *dev)
+int __devinit epson1355fb_probe(struct platform_device *dev)
{
struct epson1355_par *default_par;
struct fb_info *info;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 14/58] move sh_flctl's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (12 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 13/58] move epson1355fb's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-30 2:26 ` Yoshihiro Shimoda
2009-03-27 23:26 ` [PATCH 15/58] move gbefb's " Uwe Kleine-König
` (43 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Yoshihiro Shimoda, David Woodhouse, Paul Mundt
A pointer to flctl_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/mtd/nand/sh_flctl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
index 821acb0..fdc0e4e 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/sh_flctl.c
@@ -763,7 +763,7 @@ static int flctl_chip_init_tail(struct mtd_info *mtd)
return 0;
}
-static int __init flctl_probe(struct platform_device *pdev)
+static int __devinit flctl_probe(struct platform_device *pdev)
{
struct resource *res;
struct sh_flctl *flctl;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 14/58] move sh_flctl's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 14/58] move sh_flctl's " Uwe Kleine-König
@ 2009-03-30 2:26 ` Yoshihiro Shimoda
0 siblings, 0 replies; 100+ messages in thread
From: Yoshihiro Shimoda @ 2009-03-30 2:26 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, David Woodhouse, Paul Mundt
Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Thanks,
Yoshihiro Shimoda
Uwe Kleine-König wrote:
> A pointer to flctl_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
> Cc: David Woodhouse <David.Woodhouse@intel.com>
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> drivers/mtd/nand/sh_flctl.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
> index 821acb0..fdc0e4e 100644
> --- a/drivers/mtd/nand/sh_flctl.c
> +++ b/drivers/mtd/nand/sh_flctl.c
> @@ -763,7 +763,7 @@ static int flctl_chip_init_tail(struct mtd_info *mtd)
> return 0;
> }
>
> -static int __init flctl_probe(struct platform_device *pdev)
> +static int __devinit flctl_probe(struct platform_device *pdev)
> {
> struct resource *res;
> struct sh_flctl *flctl;
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 15/58] move gbefb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (13 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 14/58] move sh_flctl's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 16/58] move h1940-bt's " Uwe Kleine-König
` (42 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Roel Kluin, Krzysztof Helt, Thomas Bogendoerfer,
Antonino Daplas, Kaj-Michael Lang, Martin Michlmayr,
Joshua Kinard
A pointer to gbefb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Roel Kluin <roel.kluin@gmail.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Kaj-Michael Lang <milang@tal.org>
Cc: Martin Michlmayr <tbm@cyrius.com>
Cc: Joshua Kinard <kumba@gentoo.org>
---
drivers/video/gbefb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c
index fe5b519..4c7f3a0 100644
--- a/drivers/video/gbefb.c
+++ b/drivers/video/gbefb.c
@@ -1128,7 +1128,7 @@ int __init gbefb_setup(char *options)
return 0;
}
-static int __init gbefb_probe(struct platform_device *p_dev)
+static int __devinit gbefb_probe(struct platform_device *p_dev)
{
int i, ret = 0;
struct fb_info *info;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 16/58] move h1940-bt's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (14 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 15/58] move gbefb's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 17/58] move h1940-leds's " Uwe Kleine-König
` (41 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Russell King, Arnaud Patard, Ben Dooks
A pointer to h1940bt_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
arch/arm/mach-s3c2410/h1940-bluetooth.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-s3c2410/h1940-bluetooth.c b/arch/arm/mach-s3c2410/h1940-bluetooth.c
index 5a6bc56..6810f9c 100644
--- a/arch/arm/mach-s3c2410/h1940-bluetooth.c
+++ b/arch/arm/mach-s3c2410/h1940-bluetooth.c
@@ -84,7 +84,7 @@ static DEVICE_ATTR(enable, 0644,
h1940bt_show,
h1940bt_store);
-static int __init h1940bt_probe(struct platform_device *pdev)
+static int __devinit h1940bt_probe(struct platform_device *pdev)
{
/* Configures BT serial port GPIOs */
s3c2410_gpio_cfgpin(S3C2410_GPH0, S3C2410_GPH0_nCTS0);
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 17/58] move h1940-leds's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (15 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 16/58] move h1940-bt's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 18/58] move hgafb's " Uwe Kleine-König
` (40 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Russell King, Ben Dooks, Richard Purdie,
Márton Németh, Arnaud Patard
A pointer to h1940leds_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Márton Németh <nm127@freemail.hu>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/leds/leds-h1940.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/leds/leds-h1940.c b/drivers/leds/leds-h1940.c
index 11b77a7..1aa46a3 100644
--- a/drivers/leds/leds-h1940.c
+++ b/drivers/leds/leds-h1940.c
@@ -104,7 +104,7 @@ static struct led_classdev h1940_blueled = {
.default_trigger = "h1940-bluetooth",
};
-static int __init h1940leds_probe(struct platform_device *pdev)
+static int __devinit h1940leds_probe(struct platform_device *pdev)
{
int ret;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 18/58] move hgafb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (16 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 17/58] move h1940-leds's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 19/58] move hitfb's " Uwe Kleine-König
` (39 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Krzysztof Helt, Anton Vorontsov, Antonino Daplas
A pointer to hgafb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Antonino Daplas <adaplas@pol.net>
---
drivers/video/hgafb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c
index 0129c04..db9b785 100644
--- a/drivers/video/hgafb.c
+++ b/drivers/video/hgafb.c
@@ -551,7 +551,7 @@ static struct fb_ops hgafb_ops = {
* Initialization
*/
-static int __init hgafb_probe(struct platform_device *pdev)
+static int __devinit hgafb_probe(struct platform_device *pdev)
{
struct fb_info *info;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 19/58] move hitfb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (17 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 18/58] move hgafb's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 20/58] move hp680-bl's " Uwe Kleine-König
` (38 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Paul Mundt, Andriy Skulysh, Antonino Daplas
A pointer to hitfb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Andriy Skulysh <askulysh@gmail.com>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/hitfb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
index e6467cf..be3d89a 100644
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -328,7 +328,7 @@ static struct fb_ops hitfb_ops = {
.fb_imageblit = cfb_imageblit,
};
-static int __init hitfb_probe(struct platform_device *dev)
+static int __devinit hitfb_probe(struct platform_device *dev)
{
unsigned short lcdclor, ldr3, ldvndr;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 20/58] move hp680-bl's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (18 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 19/58] move hitfb's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-28 9:25 ` Kristoffer Ericson
2009-03-27 23:26 ` [PATCH 21/58] move hp-wmi's " Uwe Kleine-König
` (37 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Akinobu Mita, Richard Purdie, Paul Mundt,
Kristoffer Ericson, Andriy Skulysh, Antonino Daplas
A pointer to hp680bl_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Richard Purdie <rpurdie@linux.intel.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andriy Skulysh <askulysh@gmail.com>
Cc: Antonino Daplas <adaplas@pol.net>
---
drivers/video/backlight/hp680_bl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c
index 5be55a2..7fb4eef 100644
--- a/drivers/video/backlight/hp680_bl.c
+++ b/drivers/video/backlight/hp680_bl.c
@@ -103,7 +103,7 @@ static struct backlight_ops hp680bl_ops = {
.update_status = hp680bl_set_intensity,
};
-static int __init hp680bl_probe(struct platform_device *pdev)
+static int __devinit hp680bl_probe(struct platform_device *pdev)
{
struct backlight_device *bd;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 20/58] move hp680-bl's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 20/58] move hp680-bl's " Uwe Kleine-König
@ 2009-03-28 9:25 ` Kristoffer Ericson
0 siblings, 0 replies; 100+ messages in thread
From: Kristoffer Ericson @ 2009-03-28 9:25 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Akinobu Mita, Richard Purdie,
Paul Mundt, Kristoffer Ericson, Andriy Skulysh, Antonino Daplas
[-- Attachment #1: Type: text/plain, Size: 1782 bytes --]
Acked-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
On Sat, 28 Mar 2009 00:26:41 +0100
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> A pointer to hp680bl_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Richard Purdie <rpurdie@linux.intel.com>
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Andriy Skulysh <askulysh@gmail.com>
> Cc: Antonino Daplas <adaplas@pol.net>
> ---
> drivers/video/backlight/hp680_bl.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c
> index 5be55a2..7fb4eef 100644
> --- a/drivers/video/backlight/hp680_bl.c
> +++ b/drivers/video/backlight/hp680_bl.c
> @@ -103,7 +103,7 @@ static struct backlight_ops hp680bl_ops = {
> .update_status = hp680bl_set_intensity,
> };
>
> -static int __init hp680bl_probe(struct platform_device *pdev)
> +static int __devinit hp680bl_probe(struct platform_device *pdev)
> {
> struct backlight_device *bd;
>
> --
> 1.6.2
>
--
Kristoffer Ericson <kristoffer.ericson@gmail.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 21/58] move hp-wmi's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (19 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 20/58] move hp680-bl's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 22/58] move jazzsonic's " Uwe Kleine-König
` (36 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Frans Pop, Larry Finger, Len Brown, Helge Deller,
Matthew Garrett
A pointer to hp_wmi_bios_setup is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Frans Pop <elendil@planet.nl>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Len Brown <lenb@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/platform/x86/hp-wmi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index f41135f..7b31da7 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -51,7 +51,7 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4");
#define HPWMI_WIRELESS_QUERY 0x5
#define HPWMI_HOTKEY_QUERY 0xc
-static int __init hp_wmi_bios_setup(struct platform_device *device);
+static int __devinit hp_wmi_bios_setup(struct platform_device *device);
static int __exit hp_wmi_bios_remove(struct platform_device *device);
struct bios_args {
@@ -409,7 +409,7 @@ static void cleanup_sysfs(struct platform_device *device)
device_remove_file(&device->dev, &dev_attr_dock);
}
-static int __init hp_wmi_bios_setup(struct platform_device *device)
+static int __devinit hp_wmi_bios_setup(struct platform_device *device)
{
int err;
int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0);
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 22/58] move jazzsonic's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (20 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 21/58] move hp-wmi's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-28 8:40 ` Geert Uytterhoeven
` (2 more replies)
2009-03-27 23:26 ` [PATCH 23/58] move jornada_ssp's " Uwe Kleine-König
` (35 subsequent siblings)
57 siblings, 3 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Ralf Baechle, Jeff Garzik, David S. Miller,
Thomas Bogendoerfer, Finn Thain, Geert Uytterhoeven
A pointer to jazz_sonic_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/jazzsonic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
index 14248cf..3695f2d 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -204,7 +204,7 @@ out:
* Probe for a SONIC ethernet controller on a Mips Jazz board.
* Actually probing is superfluous but we're paranoid.
*/
-static int __init jazz_sonic_probe(struct platform_device *pdev)
+static int __devinit jazz_sonic_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct sonic_local *lp;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 22/58] move jazzsonic's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 22/58] move jazzsonic's " Uwe Kleine-König
@ 2009-03-28 8:40 ` Geert Uytterhoeven
2009-03-28 10:45 ` Ralf Baechle
2009-03-28 19:25 ` [PATCH] " Uwe Kleine-König
2 siblings, 0 replies; 100+ messages in thread
From: Geert Uytterhoeven @ 2009-03-28 8:40 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Ralf Baechle, Jeff Garzik,
David S. Miller, Thomas Bogendoerfer, Finn Thain
2009/3/28 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> A pointer to jazz_sonic_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Jeff Garzik <jeff@garzik.org>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Finn Thain <fthain@telegraphics.com.au>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> drivers/net/jazzsonic.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
> index 14248cf..3695f2d 100644
> --- a/drivers/net/jazzsonic.c
> +++ b/drivers/net/jazzsonic.c
> @@ -204,7 +204,7 @@ out:
> * Probe for a SONIC ethernet controller on a Mips Jazz board.
> * Actually probing is superfluous but we're paranoid.
> */
> -static int __init jazz_sonic_probe(struct platform_device *pdev)
> +static int __devinit jazz_sonic_probe(struct platform_device *pdev)
> {
> struct net_device *dev;
> struct sonic_local *lp;
Same problem in sonic_probe1() (called from sonic_probe())
-Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 100+ messages in thread* Re: [PATCH 22/58] move jazzsonic's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 22/58] move jazzsonic's " Uwe Kleine-König
2009-03-28 8:40 ` Geert Uytterhoeven
@ 2009-03-28 10:45 ` Ralf Baechle
2009-03-28 19:25 ` [PATCH] " Uwe Kleine-König
2 siblings, 0 replies; 100+ messages in thread
From: Ralf Baechle @ 2009-03-28 10:45 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Jeff Garzik, David S. Miller,
Thomas Bogendoerfer, Finn Thain, Geert Uytterhoeven
On Sat, Mar 28, 2009 at 12:26:43AM +0100, Uwe Kleine-König wrote:
> A pointer to jazz_sonic_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Jeff Garzik <jeff@garzik.org>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Finn Thain <fthain@telegraphics.com.au>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Ralf
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH] move jazzsonic's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 22/58] move jazzsonic's " Uwe Kleine-König
2009-03-28 8:40 ` Geert Uytterhoeven
2009-03-28 10:45 ` Ralf Baechle
@ 2009-03-28 19:25 ` Uwe Kleine-König
2009-03-29 8:55 ` Geert Uytterhoeven
2 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-28 19:25 UTC (permalink / raw)
To: linux-kernel
Cc: Ralf Baechle, Jeff Garzik, David S. Miller, Thomas Bogendoerfer,
Finn Thain, Geert Uytterhoeven, Andrew Morton
A pointer to jazz_sonic_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
As noticed by Geert Uytterhoeven sonic_probe1 is called by
jazz_sonic_probe, so the former has to move to .devinit.text, too.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
Hi Geert and Ralf,
thanks for your feed-back.
@Geert: Did you notice this, or your compiler?
@Ralf: I assume that I can still add your ack after this additional change?
Best regards
Uwe
drivers/net/jazzsonic.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
index 14248cf..ca68383 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -96,7 +96,7 @@ static int jazzsonic_close(struct net_device* dev)
return err;
}
-static int __init sonic_probe1(struct net_device *dev)
+static int __devinit sonic_probe1(struct net_device *dev)
{
static unsigned version_printed;
unsigned int silicon_revision;
@@ -204,7 +204,7 @@ out:
* Probe for a SONIC ethernet controller on a Mips Jazz board.
* Actually probing is superfluous but we're paranoid.
*/
-static int __init jazz_sonic_probe(struct platform_device *pdev)
+static int __devinit jazz_sonic_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct sonic_local *lp;
--
tg: (be0ea69..) t/platsection/jazz_sonic_driver (depends on: linus/master)
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH] move jazzsonic's probe function to .devinit.text
2009-03-28 19:25 ` [PATCH] " Uwe Kleine-König
@ 2009-03-29 8:55 ` Geert Uytterhoeven
0 siblings, 0 replies; 100+ messages in thread
From: Geert Uytterhoeven @ 2009-03-29 8:55 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Ralf Baechle, Jeff Garzik, David S. Miller,
Thomas Bogendoerfer, Finn Thain, Andrew Morton
2009/3/28 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> A pointer to jazz_sonic_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> As noticed by Geert Uytterhoeven sonic_probe1 is called by
> jazz_sonic_probe, so the former has to move to .devinit.text, too.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Jeff Garzik <jeff@garzik.org>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Finn Thain <fthain@telegraphics.com.au>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> Hi Geert and Ralf,
>
> thanks for your feed-back.
>
> @Geert: Did you notice this, or your compiler?
I noticed this in macsonic, when I reviewed your patch.
As jazzsonic is very similar to macsonic, I suspected your patch had the
same issue there ;-)
Probably the compiler didn't tell you, because it inlined the other functions.
Still wondering why my compiler didn't tell me before. Maybe I just forgot to
build for Mac with CONFIG_DEBUG_SECTION_MISMATCH=y...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 23/58] move jornada_ssp's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (21 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 22/58] move jazzsonic's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-28 9:26 ` Kristoffer Ericson
2009-03-27 23:26 ` [PATCH 24/58] move ks8695_wdt's " Uwe Kleine-König
` (34 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Kristoffer Ericson, Russell King
A pointer to jornada_ssp_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
arch/arm/mach-sa1100/jornada720_ssp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c
index 28cf369..ce4c6cb 100644
--- a/arch/arm/mach-sa1100/jornada720_ssp.c
+++ b/arch/arm/mach-sa1100/jornada720_ssp.c
@@ -130,7 +130,7 @@ void jornada_ssp_end(void)
};
EXPORT_SYMBOL(jornada_ssp_end);
-static int __init jornada_ssp_probe(struct platform_device *dev)
+static int __devinit jornada_ssp_probe(struct platform_device *dev)
{
int ret;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 23/58] move jornada_ssp's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 23/58] move jornada_ssp's " Uwe Kleine-König
@ 2009-03-28 9:26 ` Kristoffer Ericson
0 siblings, 0 replies; 100+ messages in thread
From: Kristoffer Ericson @ 2009-03-28 9:26 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Kristoffer Ericson, Russell King
[-- Attachment #1: Type: text/plain, Size: 1601 bytes --]
Acked-by : Kristoffer Ericson <kristoffer.ericson@gmail.com>
Thx
On Sat, 28 Mar 2009 00:26:44 +0100
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> A pointer to jornada_ssp_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> arch/arm/mach-sa1100/jornada720_ssp.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c
> index 28cf369..ce4c6cb 100644
> --- a/arch/arm/mach-sa1100/jornada720_ssp.c
> +++ b/arch/arm/mach-sa1100/jornada720_ssp.c
> @@ -130,7 +130,7 @@ void jornada_ssp_end(void)
> };
> EXPORT_SYMBOL(jornada_ssp_end);
>
> -static int __init jornada_ssp_probe(struct platform_device *dev)
> +static int __devinit jornada_ssp_probe(struct platform_device *dev)
> {
> int ret;
>
> --
> 1.6.2
>
--
Kristoffer Ericson <kristoffer.ericson@gmail.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 24/58] move ks8695_wdt's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (22 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 23/58] move jornada_ssp's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 25/58] move macsonic's " Uwe Kleine-König
` (33 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Alexey Dobriyan, Wim Van Sebroeck, Alan Cox
A pointer to ks8695wdt_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Alan Cox <alan@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/watchdog/ks8695_wdt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/watchdog/ks8695_wdt.c b/drivers/watchdog/ks8695_wdt.c
index 74c92d3..cdbb36a 100644
--- a/drivers/watchdog/ks8695_wdt.c
+++ b/drivers/watchdog/ks8695_wdt.c
@@ -221,7 +221,7 @@ static struct miscdevice ks8695wdt_miscdev = {
.fops = &ks8695wdt_fops,
};
-static int __init ks8695wdt_probe(struct platform_device *pdev)
+static int __devinit ks8695wdt_probe(struct platform_device *pdev)
{
int res;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 25/58] move macsonic's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (23 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 24/58] move ks8695_wdt's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-28 8:39 ` Geert Uytterhoeven
2009-03-28 19:33 ` [PATCH] " Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 26/58] move meth's " Uwe Kleine-König
` (32 subsequent siblings)
57 siblings, 2 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Jeff Garzik, David S. Miller, Finn Thain,
Geert Uytterhoeven
A pointer to mac_sonic_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/macsonic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c
index 527166e..d4f913b 100644
--- a/drivers/net/macsonic.c
+++ b/drivers/net/macsonic.c
@@ -555,7 +555,7 @@ static int __init mac_nubus_sonic_probe(struct net_device *dev)
return macsonic_init(dev);
}
-static int __init mac_sonic_probe(struct platform_device *pdev)
+static int __devinit mac_sonic_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct sonic_local *lp;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 25/58] move macsonic's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 25/58] move macsonic's " Uwe Kleine-König
@ 2009-03-28 8:39 ` Geert Uytterhoeven
2009-03-28 19:33 ` [PATCH] " Uwe Kleine-König
1 sibling, 0 replies; 100+ messages in thread
From: Geert Uytterhoeven @ 2009-03-28 8:39 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Jeff Garzik, David S. Miller,
Finn Thain, linux-m68k
2009/3/28 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> A pointer to mac_sonic_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Jeff Garzik <jgarzik@redhat.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Finn Thain <fthain@telegraphics.com.au>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> drivers/net/macsonic.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c
> index 527166e..d4f913b 100644
> --- a/drivers/net/macsonic.c
> +++ b/drivers/net/macsonic.c
> @@ -555,7 +555,7 @@ static int __init mac_nubus_sonic_probe(struct net_device *dev)
> return macsonic_init(dev);
> }
>
> -static int __init mac_sonic_probe(struct platform_device *pdev)
> +static int __devinit mac_sonic_probe(struct platform_device *pdev)
> {
> struct net_device *dev;
> struct sonic_local *lp;
mac_{onboard,nubus}_sonic_probe() (called by mac_sonic_probe()) have the
same problem.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 100+ messages in thread* [PATCH] move macsonic's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 25/58] move macsonic's " Uwe Kleine-König
2009-03-28 8:39 ` Geert Uytterhoeven
@ 2009-03-28 19:33 ` Uwe Kleine-König
1 sibling, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-28 19:33 UTC (permalink / raw)
To: linux-kernel
Cc: Jeff Garzik, David S. Miller, Finn Thain, Geert Uytterhoeven,
Andrew Morton
A pointer to mac_sonic_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
Various other functions that are called by mac_sonic_probe need to move
to .devinit.text, too.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/macsonic.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c
index 527166e..e4f177e 100644
--- a/drivers/net/macsonic.c
+++ b/drivers/net/macsonic.c
@@ -167,7 +167,7 @@ static int macsonic_close(struct net_device* dev)
return err;
}
-static int __init macsonic_init(struct net_device *dev)
+static int __devinit macsonic_init(struct net_device *dev)
{
struct sonic_local* lp = netdev_priv(dev);
@@ -216,7 +216,7 @@ static int __init macsonic_init(struct net_device *dev)
return 0;
}
-static int __init mac_onboard_sonic_ethernet_addr(struct net_device *dev)
+static int __devinit mac_onboard_sonic_ethernet_addr(struct net_device *dev)
{
struct sonic_local *lp = netdev_priv(dev);
const int prom_addr = ONBOARD_SONIC_PROM_BASE;
@@ -281,7 +281,7 @@ static int __init mac_onboard_sonic_ethernet_addr(struct net_device *dev)
} else return 0;
}
-static int __init mac_onboard_sonic_probe(struct net_device *dev)
+static int __devinit mac_onboard_sonic_probe(struct net_device *dev)
{
/* Bwahahaha */
static int once_is_more_than_enough;
@@ -402,7 +402,7 @@ static int __init mac_onboard_sonic_probe(struct net_device *dev)
return macsonic_init(dev);
}
-static int __init mac_nubus_sonic_ethernet_addr(struct net_device *dev,
+static int __devinit mac_nubus_sonic_ethernet_addr(struct net_device *dev,
unsigned long prom_addr,
int id)
{
@@ -417,7 +417,7 @@ static int __init mac_nubus_sonic_ethernet_addr(struct net_device *dev,
return 0;
}
-static int __init macsonic_ident(struct nubus_dev *ndev)
+static int __devinit macsonic_ident(struct nubus_dev *ndev)
{
if (ndev->dr_hw == NUBUS_DRHW_ASANTE_LC &&
ndev->dr_sw == NUBUS_DRSW_SONIC_LC)
@@ -442,7 +442,7 @@ static int __init macsonic_ident(struct nubus_dev *ndev)
return -1;
}
-static int __init mac_nubus_sonic_probe(struct net_device *dev)
+static int __devinit mac_nubus_sonic_probe(struct net_device *dev)
{
static int slots;
struct nubus_dev* ndev = NULL;
@@ -555,7 +555,7 @@ static int __init mac_nubus_sonic_probe(struct net_device *dev)
return macsonic_init(dev);
}
-static int __init mac_sonic_probe(struct platform_device *pdev)
+static int __devinit mac_sonic_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct sonic_local *lp;
--
tg: (be0ea69..) t/platsection/mac_sonic_driver (depends on: linus/master)
^ permalink raw reply related [flat|nested] 100+ messages in thread
* [PATCH 26/58] move meth's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (24 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 25/58] move macsonic's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-28 10:45 ` Ralf Baechle
2009-03-27 23:26 ` [PATCH 27/58] move mmci-omap's " Uwe Kleine-König
` (31 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, David S. Miller, Thomas Bogendoerfer,
Christoph Lameter, Jeff Garzik, Ralf Baechle
A pointer to meth_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/meth.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index c336a1f..8947129 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -775,7 +775,7 @@ static int meth_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
/*
* The init function.
*/
-static int __init meth_probe(struct platform_device *pdev)
+static int __devinit meth_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct meth_private *priv;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 26/58] move meth's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 26/58] move meth's " Uwe Kleine-König
@ 2009-03-28 10:45 ` Ralf Baechle
0 siblings, 0 replies; 100+ messages in thread
From: Ralf Baechle @ 2009-03-28 10:45 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, David S. Miller, Thomas Bogendoerfer,
Christoph Lameter, Jeff Garzik
On Sat, Mar 28, 2009 at 12:26:47AM +0100, Uwe Kleine-König wrote:
> A pointer to meth_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Christoph Lameter <cl@linux-foundation.org>
> Cc: Jeff Garzik <jgarzik@redhat.com>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Ralf
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 27/58] move mmci-omap's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (25 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 26/58] move meth's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 28/58] move mailbox's " Uwe Kleine-König
` (30 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Grazvydas Ignotas, Pierre Ossman, David Brownell,
Tony Lindgren, Russell King, Paul Walmsley, Jarkko Lavinen,
Hiroshi DOYU, Kyungmin Park, Carlos Eduardo Aguiar
A pointer to mmc_omap_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Grazvydas Ignotas <notasas@gmail.com>
Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/mmc/host/omap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 67d7b7f..33bf49f 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1394,7 +1394,7 @@ static void mmc_omap_remove_slot(struct mmc_omap_slot *slot)
mmc_free_host(mmc);
}
-static int __init mmc_omap_probe(struct platform_device *pdev)
+static int __devinit mmc_omap_probe(struct platform_device *pdev)
{
struct omap_mmc_platform_data *pdata = pdev->dev.platform_data;
struct mmc_omap_host *host = NULL;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 28/58] move mailbox's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (26 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 27/58] move mmci-omap's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 29/58] move omap24xxcam's " Uwe Kleine-König
` (29 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Russell King, Tony Lindgren, Hiroshi DOYU,
Juha Yrjola
A pointer to omap1_mbox_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Cc: Juha Yrjola <juha.yrjola@solidboot.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
arch/arm/mach-omap1/mailbox.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c
index 59abbf3..e91211c 100644
--- a/arch/arm/mach-omap1/mailbox.c
+++ b/arch/arm/mach-omap1/mailbox.c
@@ -143,7 +143,7 @@ struct omap_mbox mbox_dsp_info = {
};
EXPORT_SYMBOL(mbox_dsp_info);
-static int __init omap1_mbox_probe(struct platform_device *pdev)
+static int __devinit omap1_mbox_probe(struct platform_device *pdev)
{
struct resource *res;
int ret = 0;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 29/58] move omap24xxcam's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (27 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 28/58] move mailbox's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-04-01 7:40 ` Sakari Ailus
2009-04-01 8:36 ` Trilok Soni
2009-03-27 23:26 ` [PATCH 30/58] move mailbox's " Uwe Kleine-König
` (28 subsequent siblings)
57 siblings, 2 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Sakari Ailus, Trilok Soni, Hans Verkuil,
Mauro Carvalho Chehab
A pointer to omap24xxcam_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Sakari Ailus <sakari.ailus@nokia.com>
Cc: Trilok Soni <soni.trilok@gmail.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/media/video/omap24xxcam.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c
index 73eb656..270e60d 100644
--- a/drivers/media/video/omap24xxcam.c
+++ b/drivers/media/video/omap24xxcam.c
@@ -1744,7 +1744,7 @@ static struct v4l2_int_device omap24xxcam = {
*
*/
-static int __init omap24xxcam_probe(struct platform_device *pdev)
+static int __devinit omap24xxcam_probe(struct platform_device *pdev)
{
struct omap24xxcam_device *cam;
struct resource *mem;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 29/58] move omap24xxcam's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 29/58] move omap24xxcam's " Uwe Kleine-König
@ 2009-04-01 7:40 ` Sakari Ailus
2009-04-01 8:28 ` Uwe Kleine-König
2009-04-01 8:36 ` Trilok Soni
1 sibling, 1 reply; 100+ messages in thread
From: Sakari Ailus @ 2009-04-01 7:40 UTC (permalink / raw)
To: ext Uwe Kleine-König
Cc: linux-kernel@vger.kernel.org, Andrew Morton, Trilok Soni,
Hans Verkuil, Mauro Carvalho Chehab
ext Uwe Kleine-König wrote:
> A pointer to omap24xxcam_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Sakari Ailus <sakari.ailus@nokia.com>
> Cc: Trilok Soni <soni.trilok@gmail.com>
> Cc: Hans Verkuil <hverkuil@xs4all.nl>
> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> drivers/media/video/omap24xxcam.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
--
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com
^ permalink raw reply [flat|nested] 100+ messages in thread
* Re: [PATCH 29/58] move omap24xxcam's probe function to .devinit.text
2009-04-01 7:40 ` Sakari Ailus
@ 2009-04-01 8:28 ` Uwe Kleine-König
2009-04-01 9:02 ` Sakari Ailus
0 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-04-01 8:28 UTC (permalink / raw)
To: sakari.ailus
Cc: linux-kernel@vger.kernel.org, Andrew Morton, Trilok Soni,
Hans Verkuil, Mauro Carvalho Chehab
Hallo Sakari,
On Wed, Apr 01, 2009 at 10:40:15AM +0300, Sakari Ailus wrote:
> ext Uwe Kleine-König wrote:
>> A pointer to omap24xxcam_probe is passed to the core via
>> platform_driver_register and so the function must not disappear when the
>> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
>> unbinding and binding a device to the driver via sysfs will result in an
>> oops as does a device being registered late.
>>
>> An alternative to this patch is using platform_driver_probe instead of
>> platform_driver_register plus removing the pointer to the probe function
>> from the struct platform_driver.
>>
>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>> Cc: Sakari Ailus <sakari.ailus@nokia.com>
>> Cc: Trilok Soni <soni.trilok@gmail.com>
>> Cc: Hans Verkuil <hverkuil@xs4all.nl>
>> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> ---
>> drivers/media/video/omap24xxcam.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Does your S-o-b means you care for inclusion in mainline?[1] Or should
I record that as an Acked-by?
Best regards
Uwe
[1] Quoting Documentation/SubmittingPatches:
"The Signed-off-by: tag indicates that the signer was involved
in the development of the patch, or that he/she was in the
patch's delivery path.
If a person was not directly involved in the preparation or
handling of a patch but wishes to signify and record their
approval of it then they can arrange to have an Acked-by: line
added to the patch's changelog."
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 100+ messages in thread
* Re: [PATCH 29/58] move omap24xxcam's probe function to .devinit.text
2009-04-01 8:28 ` Uwe Kleine-König
@ 2009-04-01 9:02 ` Sakari Ailus
0 siblings, 0 replies; 100+ messages in thread
From: Sakari Ailus @ 2009-04-01 9:02 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel@vger.kernel.org, Andrew Morton, Trilok Soni,
Hans Verkuil, Mauro Carvalho Chehab
Uwe Kleine-König wrote:
> Hallo Sakari,
>
> On Wed, Apr 01, 2009 at 10:40:15AM +0300, Sakari Ailus wrote:
>> ext Uwe Kleine-König wrote:
>>> A pointer to omap24xxcam_probe is passed to the core via
>>> platform_driver_register and so the function must not disappear when the
>>> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
>>> unbinding and binding a device to the driver via sysfs will result in an
>>> oops as does a device being registered late.
>>>
>>> An alternative to this patch is using platform_driver_probe instead of
>>> platform_driver_register plus removing the pointer to the probe function
>>> from the struct platform_driver.
>>>
>>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>>> Cc: Sakari Ailus <sakari.ailus@nokia.com>
>>> Cc: Trilok Soni <soni.trilok@gmail.com>
>>> Cc: Hans Verkuil <hverkuil@xs4all.nl>
>>> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
>>> Cc: Andrew Morton <akpm@linux-foundation.org>
>>> ---
>>> drivers/media/video/omap24xxcam.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>> Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
> Does your S-o-b means you care for inclusion in mainline?[1] Or should
> I record that as an Acked-by?
Sorry. Take that as Acked-by.
--
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com
^ permalink raw reply [flat|nested] 100+ messages in thread
* Re: [PATCH 29/58] move omap24xxcam's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 29/58] move omap24xxcam's " Uwe Kleine-König
2009-04-01 7:40 ` Sakari Ailus
@ 2009-04-01 8:36 ` Trilok Soni
1 sibling, 0 replies; 100+ messages in thread
From: Trilok Soni @ 2009-04-01 8:36 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Sakari Ailus, Hans Verkuil,
Mauro Carvalho Chehab
Hi Uwe,
>
> -static int __init omap24xxcam_probe(struct platform_device *pdev)
> +static int __devinit omap24xxcam_probe(struct platform_device *pdev)
> {
> struct omap24xxcam_device *cam;
> struct resource *mem;
> --
> 1.6.2
>
>
Acked-by: Trilok Soni <soni.trilok@gmail.com>
--
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 30/58] move mailbox's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (28 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 29/58] move omap24xxcam's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 31/58] move omap_hdq's " Uwe Kleine-König
` (27 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Hiroshi DOYU, Tony Lindgren, Juha Yrjola,
Russell King
A pointer to omap2_mbox_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Juha Yrjola <juha.yrjola@solidboot.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
arch/arm/mach-omap2/mailbox.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 32b7af3..726876c 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -251,7 +251,7 @@ static struct omap_mbox mbox_iva_info = {
.priv = &omap2_mbox_iva_priv,
};
-static int __init omap2_mbox_probe(struct platform_device *pdev)
+static int __devinit omap2_mbox_probe(struct platform_device *pdev)
{
struct resource *res;
int ret = 0;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 31/58] move omap_hdq's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (29 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 30/58] move mailbox's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-28 8:21 ` Evgeniy Polyakov
2009-03-27 23:26 ` [PATCH 32/58] move i2c_omap's " Uwe Kleine-König
` (26 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Stanley.Miao, Evgeniy Polyakov,
Madhusudhan Chikkature, Felipe Balbi
A pointer to omap_hdq_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Stanley.Miao <stanley.miao@windriver.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
---
drivers/w1/masters/omap_hdq.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index c973889..6a5dd2e 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -72,7 +72,7 @@ struct hdq_data {
int init_trans;
};
-static int __init omap_hdq_probe(struct platform_device *pdev);
+static int __devinit omap_hdq_probe(struct platform_device *pdev);
static int omap_hdq_remove(struct platform_device *pdev);
static struct platform_driver omap_hdq_driver = {
@@ -558,7 +558,7 @@ static void omap_w1_write_byte(void *_hdq, u8 byte)
return;
}
-static int __init omap_hdq_probe(struct platform_device *pdev)
+static int __devinit omap_hdq_probe(struct platform_device *pdev)
{
struct hdq_data *hdq_data;
struct resource *res;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 31/58] move omap_hdq's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 31/58] move omap_hdq's " Uwe Kleine-König
@ 2009-03-28 8:21 ` Evgeniy Polyakov
2009-03-28 19:37 ` Uwe Kleine-König
0 siblings, 1 reply; 100+ messages in thread
From: Evgeniy Polyakov @ 2009-03-28 8:21 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Stanley.Miao, Madhusudhan Chikkature,
Felipe Balbi
Hi Uwe.
On Sat, Mar 28, 2009 at 12:26:52AM +0100, Uwe Kleine-König (u.kleine-koenig@pengutronix.de) wrote:
> A pointer to omap_hdq_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
I wonder if it can be hotplugged, but for the consistency it looks good.
--
Evgeniy Polyakov
^ permalink raw reply [flat|nested] 100+ messages in thread
* Re: [PATCH 31/58] move omap_hdq's probe function to .devinit.text
2009-03-28 8:21 ` Evgeniy Polyakov
@ 2009-03-28 19:37 ` Uwe Kleine-König
2009-03-28 20:53 ` Evgeniy Polyakov
0 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-28 19:37 UTC (permalink / raw)
To: Evgeniy Polyakov
Cc: linux-kernel, Andrew Morton, Stanley.Miao, Madhusudhan Chikkature,
Felipe Balbi
Hi Evgeniy,
On Sat, Mar 28, 2009 at 11:21:49AM +0300, Evgeniy Polyakov wrote:
> On Sat, Mar 28, 2009 at 12:26:52AM +0100, Uwe Kleine-König (u.kleine-koenig@pengutronix.de) wrote:
> > A pointer to omap_hdq_probe is passed to the core via
> > platform_driver_register and so the function must not disappear when the
> > .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> > unbinding and binding a device to the driver via sysfs will result in an
> > oops as does a device being registered late.
> >
> > An alternative to this patch is using platform_driver_probe instead of
> > platform_driver_register plus removing the pointer to the probe function
> > from the struct platform_driver.
>
> I wonder if it can be hotplugged, but for the consistency it looks good.
Maybe you cannot really hotplug it, but with CONFIG_HOTPLUG you can
unbind it via sysfs and rebind it afterwards, too.
Can I consider this an Acked-by: you?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 100+ messages in thread
* Re: [PATCH 31/58] move omap_hdq's probe function to .devinit.text
2009-03-28 19:37 ` Uwe Kleine-König
@ 2009-03-28 20:53 ` Evgeniy Polyakov
0 siblings, 0 replies; 100+ messages in thread
From: Evgeniy Polyakov @ 2009-03-28 20:53 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Stanley.Miao, Madhusudhan Chikkature,
Felipe Balbi
Hi Uwe.
On Sat, Mar 28, 2009 at 08:37:02PM +0100, Uwe Kleine-König (u.kleine-koenig@pengutronix.de) wrote:
> Maybe you cannot really hotplug it, but with CONFIG_HOTPLUG you can
> unbind it via sysfs and rebind it afterwards, too.
>
> Can I consider this an Acked-by: you?
Yes, sure.
Thank you.
--
Evgeniy Polyakov
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 32/58] move i2c_omap's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (30 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 31/58] move omap_hdq's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 33/58] move mmci-omap-hs's " Uwe Kleine-König
` (25 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Kalle Jokiniemi, Tony Lindgren, Paul Walmsley,
Richard Woodruff, chandra shekhar, Jason P Marini,
Syed Mohammed Khasim, Jarkko Nikula, Juha Yrjola
A pointer to omap_i2c_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: chandra shekhar <x0044955@ti.com>
Cc: Jason P Marini <jason.marini@gmail.com>
Cc: Syed Mohammed Khasim <x0khasim@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: Juha Yrjola <juha.yrjola@solidboot.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/i2c/busses/i2c-omap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index be8ee2c..f803108 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -766,7 +766,7 @@ static const struct i2c_algorithm omap_i2c_algo = {
.functionality = omap_i2c_func,
};
-static int __init
+static int __devinit
omap_i2c_probe(struct platform_device *pdev)
{
struct omap_i2c_dev *dev;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 33/58] move mmci-omap-hs's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (31 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 32/58] move i2c_omap's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 34/58] move omap_rng's " Uwe Kleine-König
` (24 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Jean Pihet, Tony Lindgren, Pierre Ossman,
Andy Lowe, Adrian Hunter, David Brownell, Madhusudhan Chikkature
A pointer to omap_mmc_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jean Pihet <jpihet@mvista.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Pierre Ossman <drzeus@drzeus.cx>
Cc: Andy Lowe <alowe@mvista.com>
Cc: Adrian Hunter <ext-adrian.hunter@nokia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Madhusudhan Chikkature<madhu.cr@ti.com>
---
drivers/mmc/host/omap_hsmmc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index a631c81..e2085a8 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -899,7 +899,7 @@ static struct mmc_host_ops mmc_omap_ops = {
/* NYET -- enable_sdio_irq */
};
-static int __init omap_mmc_probe(struct platform_device *pdev)
+static int __devinit omap_mmc_probe(struct platform_device *pdev)
{
struct omap_mmc_platform_data *pdata = pdev->dev.platform_data;
struct mmc_host *mmc;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 34/58] move omap_rng's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (32 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 33/58] move mmci-omap-hs's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-29 7:47 ` Herbert Xu
2009-03-27 23:26 ` [PATCH 35/58] move omap_wdt's " Uwe Kleine-König
` (23 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Russell King, David Brownell, Herbert Xu,
Patrick McHardy, Jan Engelhardt, Michael Buesch
A pointer to omap_rng_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Jan Engelhardt <jengelh@gmx.de>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/char/hw_random/omap-rng.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index ba68a46..dc62622 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -89,7 +89,7 @@ static struct hwrng omap_rng_ops = {
.data_read = omap_rng_data_read,
};
-static int __init omap_rng_probe(struct platform_device *pdev)
+static int __devinit omap_rng_probe(struct platform_device *pdev)
{
struct resource *res, *mem;
int ret;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 34/58] move omap_rng's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 34/58] move omap_rng's " Uwe Kleine-König
@ 2009-03-29 7:47 ` Herbert Xu
2009-03-29 19:03 ` David Brownell
0 siblings, 1 reply; 100+ messages in thread
From: Herbert Xu @ 2009-03-29 7:47 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Russell King, David Brownell,
Patrick McHardy, Jan Engelhardt, Michael Buesch
On Sat, Mar 28, 2009 at 12:26:55AM +0100, Uwe Kleine-König wrote:
> A pointer to omap_rng_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: David Brownell <dbrownell@users.sourceforge.net>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: Patrick McHardy <kaber@trash.net>
> Cc: Jan Engelhardt <jengelh@gmx.de>
> Cc: Michael Buesch <mb@bu3sch.de>
> Cc: Andrew Morton <akpm@linux-foundation.org>
Applied to cryptodev. Thanks!
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 100+ messages in thread* Re: [PATCH 34/58] move omap_rng's probe function to .devinit.text
2009-03-29 7:47 ` Herbert Xu
@ 2009-03-29 19:03 ` David Brownell
0 siblings, 0 replies; 100+ messages in thread
From: David Brownell @ 2009-03-29 19:03 UTC (permalink / raw)
To: Herbert Xu, Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Russell King, Patrick McHardy,
Jan Engelhardt, Michael Buesch
On Sunday 29 March 2009, Herbert Xu wrote:
> On Sat, Mar 28, 2009 at 12:26:55AM +0100, Uwe Kleine-König wrote:
> > A pointer to omap_rng_probe is passed to the core via
> > platform_driver_register and so the function must not disappear when the
> > .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> > unbinding and binding a device to the driver via sysfs will result in an
> > oops as does a device being registered late.
> >
> > An alternative to this patch is using platform_driver_probe instead of
> > platform_driver_register plus removing the pointer to the probe function
> > from the struct platform_driver.
Reminder: we're expecting such an updated version,
to replace this one.
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> > Cc: David Brownell <dbrownell@users.sourceforge.net>
> > Cc: Herbert Xu <herbert@gondor.apana.org.au>
> > Cc: Patrick McHardy <kaber@trash.net>
> > Cc: Jan Engelhardt <jengelh@gmx.de>
> > Cc: Michael Buesch <mb@bu3sch.de>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
>
> Applied to cryptodev. Thanks!
> --
> Visit Openswan at http://www.openswan.org/
> Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
>
>
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 35/58] move omap_wdt's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (33 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 34/58] move omap_rng's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-29 18:09 ` Wim Van Sebroeck
2009-03-27 23:26 ` [PATCH 36/58] move orion_nand's " Uwe Kleine-König
` (22 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Alan Cox, Wim Van Sebroeck, Felipe Balbi,
George G. Davis
A pointer to omap_wdt_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Alan Cox <alan@redhat.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: George G. Davis <gdavis@mvista.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/watchdog/omap_wdt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 2f2ce74..c9c14dd 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -269,7 +269,7 @@ static const struct file_operations omap_wdt_fops = {
.release = omap_wdt_release,
};
-static int __init omap_wdt_probe(struct platform_device *pdev)
+static int __devinit omap_wdt_probe(struct platform_device *pdev)
{
struct resource *res, *mem;
struct omap_wdt_dev *wdev;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 35/58] move omap_wdt's probe function to .devinit.text
2009-03-27 23:26 ` [PATCH 35/58] move omap_wdt's " Uwe Kleine-König
@ 2009-03-29 18:09 ` Wim Van Sebroeck
2009-03-29 18:15 ` Uwe Kleine-König
0 siblings, 1 reply; 100+ messages in thread
From: Wim Van Sebroeck @ 2009-03-29 18:09 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Alan Cox, Felipe Balbi,
George G. Davis, Russell King - ARM Linux, linux-omap
Hi Uwe,
> A pointer to omap_wdt_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
Agree with the explanation, but ...
> diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> index 2f2ce74..c9c14dd 100644
> --- a/drivers/watchdog/omap_wdt.c
> +++ b/drivers/watchdog/omap_wdt.c
> @@ -269,7 +269,7 @@ static const struct file_operations omap_wdt_fops = {
> .release = omap_wdt_release,
> };
>
> -static int __init omap_wdt_probe(struct platform_device *pdev)
> +static int __devinit omap_wdt_probe(struct platform_device *pdev)
> {
> struct resource *res, *mem;
> struct omap_wdt_dev *wdev;
...imho this would be the correct fix:
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index aa5ad6e..f271385 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -258,7 +258,7 @@ static const struct file_operations omap_wdt_fops = {
.release = omap_wdt_release,
};
-static int __init omap_wdt_probe(struct platform_device *pdev)
+static int __devinit omap_wdt_probe(struct platform_device *pdev)
{
struct resource *res, *mem;
struct omap_wdt_dev *wdev;
@@ -367,7 +367,7 @@ static void omap_wdt_shutdown(struct platform_device *pdev)
omap_wdt_disable(wdev);
}
-static int omap_wdt_remove(struct platform_device *pdev)
+static int __devexit omap_wdt_remove(struct platform_device *pdev)
{
struct omap_wdt_dev *wdev = platform_get_drvdata(pdev);
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -426,7 +426,7 @@ static int omap_wdt_resume(struct platform_device *pdev)
static struct platform_driver omap_wdt_driver = {
.probe = omap_wdt_probe,
- .remove = omap_wdt_remove,
+ .remove = __devexit_p(omap_wdt_remove),
.shutdown = omap_wdt_shutdown,
.suspend = omap_wdt_suspend,
.resume = omap_wdt_resume,
Kind regards,
Wim.
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 35/58] move omap_wdt's probe function to .devinit.text
2009-03-29 18:09 ` Wim Van Sebroeck
@ 2009-03-29 18:15 ` Uwe Kleine-König
0 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-29 18:15 UTC (permalink / raw)
To: Wim Van Sebroeck
Cc: linux-kernel, Andrew Morton, Alan Cox, Felipe Balbi,
George G. Davis, Russell King - ARM Linux, linux-omap
Hi Wim,
On Sun, Mar 29, 2009 at 08:09:12PM +0200, Wim Van Sebroeck wrote:
> Hi Uwe,
>
> > A pointer to omap_wdt_probe is passed to the core via
> > platform_driver_register and so the function must not disappear when the
> > .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> > unbinding and binding a device to the driver via sysfs will result in an
> > oops as does a device being registered late.
> >
> > An alternative to this patch is using platform_driver_probe instead of
> > platform_driver_register plus removing the pointer to the probe function
> > from the struct platform_driver.
>
> Agree with the explanation, but ...
>
> > diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> > index 2f2ce74..c9c14dd 100644
> > --- a/drivers/watchdog/omap_wdt.c
> > +++ b/drivers/watchdog/omap_wdt.c
> > @@ -269,7 +269,7 @@ static const struct file_operations omap_wdt_fops = {
> > .release = omap_wdt_release,
> > };
> >
> > -static int __init omap_wdt_probe(struct platform_device *pdev)
> > +static int __devinit omap_wdt_probe(struct platform_device *pdev)
> > {
> > struct resource *res, *mem;
> > struct omap_wdt_dev *wdev;
>
> ...imho this would be the correct fix:
>
> diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> index aa5ad6e..f271385 100644
> --- a/drivers/watchdog/omap_wdt.c
> +++ b/drivers/watchdog/omap_wdt.c
> @@ -258,7 +258,7 @@ static const struct file_operations omap_wdt_fops = {
> .release = omap_wdt_release,
> };
>
> -static int __init omap_wdt_probe(struct platform_device *pdev)
> +static int __devinit omap_wdt_probe(struct platform_device *pdev)
> {
> struct resource *res, *mem;
> struct omap_wdt_dev *wdev;
> @@ -367,7 +367,7 @@ static void omap_wdt_shutdown(struct platform_device *pdev)
> omap_wdt_disable(wdev);
> }
>
> -static int omap_wdt_remove(struct platform_device *pdev)
> +static int __devexit omap_wdt_remove(struct platform_device *pdev)
> {
> struct omap_wdt_dev *wdev = platform_get_drvdata(pdev);
> struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> @@ -426,7 +426,7 @@ static int omap_wdt_resume(struct platform_device *pdev)
>
> static struct platform_driver omap_wdt_driver = {
> .probe = omap_wdt_probe,
> - .remove = omap_wdt_remove,
> + .remove = __devexit_p(omap_wdt_remove),
> .shutdown = omap_wdt_shutdown,
> .suspend = omap_wdt_suspend,
> .resume = omap_wdt_resume,
Your change is OK, but only "my" part is an important fix. With
omap_wdt_probe being defined with __init your kernel can oops.
omap_wdt_remove only occupies memory for too long if defined without
__devexit. That's why I only fixed the first part (with the remove
functions on my todo list though).
Grüßle
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 36/58] move orion_nand's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (34 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 35/58] move omap_wdt's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 37/58] move gen_nand's " Uwe Kleine-König
` (21 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Lennert Buytenhek, Saeed Bishara, Jörn Engel,
Nicolas Pitre, Tzachi Perelstein
A pointer to orion_nand_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Lennert Buytenhek <buytenh@marvell.com>
Cc: Saeed Bishara <saeed@marvell.com>
Cc: Jörn Engel <joern@logfs.org>
Cc: Nicolas Pitre <nico@marvell.com>
Cc: Tzachi Perelstein <tzachi@marvell.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/mtd/nand/orion_nand.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
index c2dfd3e..8f92fd2 100644
--- a/drivers/mtd/nand/orion_nand.c
+++ b/drivers/mtd/nand/orion_nand.c
@@ -47,7 +47,7 @@ static void orion_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl
writeb(cmd, nc->IO_ADDR_W + offs);
}
-static int __init orion_nand_probe(struct platform_device *pdev)
+static int __devinit orion_nand_probe(struct platform_device *pdev)
{
struct mtd_info *mtd;
struct nand_chip *nc;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 37/58] move gen_nand's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (35 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 36/58] move orion_nand's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:26 ` [PATCH 38/58] move q40fb's " Uwe Kleine-König
` (20 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, David Woodhouse, Kay Sievers, Hamish Moffatt,
David Brownell, Li Zefan, Vitaly Wool, Thomas Gleixner
A pointer to plat_nand_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Hamish Moffatt <hamish@cloud.net.au>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Vitaly Wool <vitalywool@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
drivers/mtd/nand/plat_nand.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c
index 75f9f48..86e1d08 100644
--- a/drivers/mtd/nand/plat_nand.c
+++ b/drivers/mtd/nand/plat_nand.c
@@ -30,7 +30,7 @@ struct plat_nand_data {
/*
* Probe for the NAND device.
*/
-static int __init plat_nand_probe(struct platform_device *pdev)
+static int __devinit plat_nand_probe(struct platform_device *pdev)
{
struct platform_nand_data *pdata = pdev->dev.platform_data;
struct plat_nand_data *data;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 38/58] move q40fb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (36 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 37/58] move gen_nand's " Uwe Kleine-König
@ 2009-03-27 23:26 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 39/58] move r8a66597_hcd's " Uwe Kleine-König
` (19 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Antonino Daplas
A pointer to q40fb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/q40fb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c
index 4beac1d..de40a62 100644
--- a/drivers/video/q40fb.c
+++ b/drivers/video/q40fb.c
@@ -85,7 +85,7 @@ static struct fb_ops q40fb_ops = {
.fb_imageblit = cfb_imageblit,
};
-static int __init q40fb_probe(struct platform_device *dev)
+static int __devinit q40fb_probe(struct platform_device *dev)
{
struct fb_info *info;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 39/58] move r8a66597_hcd's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (37 preceding siblings ...)
2009-03-27 23:26 ` [PATCH 38/58] move q40fb's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-30 2:26 ` Yoshihiro Shimoda
2009-03-27 23:27 ` [PATCH 40/58] move s3c241xfb's " Uwe Kleine-König
` (18 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Yoshihiro Shimoda, Greg Kroah-Hartman, Magnus Damm,
Stephen Rothwell, Paul Mundt
A pointer to r8a66597_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Magnus Damm <damm@igel.co.jp>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/usb/host/r8a66597-hcd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index f1626e5..3e1216a 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -2373,7 +2373,7 @@ static int __init_or_module r8a66597_remove(struct platform_device *pdev)
return 0;
}
-static int __init r8a66597_probe(struct platform_device *pdev)
+static int __devinit r8a66597_probe(struct platform_device *pdev)
{
#if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK)
char clk_name[8];
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 39/58] move r8a66597_hcd's probe function to .devinit.text
2009-03-27 23:27 ` [PATCH 39/58] move r8a66597_hcd's " Uwe Kleine-König
@ 2009-03-30 2:26 ` Yoshihiro Shimoda
0 siblings, 0 replies; 100+ messages in thread
From: Yoshihiro Shimoda @ 2009-03-30 2:26 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Greg Kroah-Hartman, Magnus Damm,
Stephen Rothwell, Paul Mundt
Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Thanks,
Yoshihiro Shimoda
Uwe Kleine-König wrote:
> A pointer to r8a66597_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Cc: Magnus Damm <damm@igel.co.jp>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> drivers/usb/host/r8a66597-hcd.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
> index f1626e5..3e1216a 100644
> --- a/drivers/usb/host/r8a66597-hcd.c
> +++ b/drivers/usb/host/r8a66597-hcd.c
> @@ -2373,7 +2373,7 @@ static int __init_or_module r8a66597_remove(struct platform_device *pdev)
> return 0;
> }
>
> -static int __init r8a66597_probe(struct platform_device *pdev)
> +static int __devinit r8a66597_probe(struct platform_device *pdev)
> {
> #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK)
> char clk_name[8];
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 40/58] move s3c241xfb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (38 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 39/58] move r8a66597_hcd's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 41/58] move sa11x0-fb's " Uwe Kleine-König
` (17 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Russell King, Ben Dooks, Arnaud Patard,
Krzysztof Helt, Antonino Daplas, Vincent Sanders
Pointers to s3c2410fb_probe and s3c2412fb_probe are passed to the core
via platform_driver_register and so the functions must not disappear
when the .init sections are discarded. Otherwise (if also having
HOTPLUG=y) unbinding and binding a device to one of the drivers via
sysfs will result in an oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Vincent Sanders <vince@simtec.co.uk>
---
drivers/video/s3c2410fb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index 79cf0b1..0ccad2c 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -940,12 +940,12 @@ dealloc_fb:
return ret;
}
-static int __init s3c2410fb_probe(struct platform_device *pdev)
+static int __devinit s3c2410fb_probe(struct platform_device *pdev)
{
return s3c24xxfb_probe(pdev, DRV_S3C2410);
}
-static int __init s3c2412fb_probe(struct platform_device *pdev)
+static int __devinit s3c2412fb_probe(struct platform_device *pdev)
{
return s3c24xxfb_probe(pdev, DRV_S3C2412);
}
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 41/58] move sa11x0-fb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (39 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 40/58] move s3c241xfb's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 42/58] move flash's " Uwe Kleine-König
` (16 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Russell King, Matthias Kaehlcke, Antonino Daplas,
Pavel Machek, Christoph Hellwig
A pointer to sa1100fb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Matthias Kaehlcke <matthias@kaehlcke.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Pavel Machek <pavel@suse.cz>
Cc: Christoph Hellwig <hch@lst.de>
---
drivers/video/sa1100fb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index 076f946..e677012 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -1451,7 +1451,7 @@ static struct sa1100fb_info * __init sa1100fb_init_fbinfo(struct device *dev)
return fbi;
}
-static int __init sa1100fb_probe(struct platform_device *pdev)
+static int __devinit sa1100fb_probe(struct platform_device *pdev)
{
struct sa1100fb_info *fbi;
int ret, irq;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 42/58] move flash's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (40 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 41/58] move sa11x0-fb's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 43/58] move sb1250-mac's " Uwe Kleine-König
` (15 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Nicolas Pitre, David Woodhouse, Russell King
A pointer to sa1100_mtd_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Nicolas Pitre <nico@marvell.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/mtd/maps/sa1100-flash.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c
index 6f6a0f6..1757ab0 100644
--- a/drivers/mtd/maps/sa1100-flash.c
+++ b/drivers/mtd/maps/sa1100-flash.c
@@ -351,7 +351,7 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
static const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
-static int __init sa1100_mtd_probe(struct platform_device *pdev)
+static int __devinit sa1100_mtd_probe(struct platform_device *pdev)
{
struct flash_platform_data *plat = pdev->dev.platform_data;
struct mtd_partition *parts;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 43/58] move sb1250-mac's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (41 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 42/58] move flash's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 44/58] move sgiseeq's " Uwe Kleine-König
` (14 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Weiwei Wang, Jeff Garzik, David S. Miller,
Stephen Hemminger, Maciej W. Rozycki
A pointer to sbmac_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Weiwei Wang <weiwei.wang@windriver.com>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/sb1250-mac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
index 88dd2e0..8c961b9 100644
--- a/drivers/net/sb1250-mac.c
+++ b/drivers/net/sb1250-mac.c
@@ -2683,7 +2683,7 @@ static int sbmac_poll(struct napi_struct *napi, int budget)
}
-static int __init sbmac_probe(struct platform_device *pldev)
+static int __devinit sbmac_probe(struct platform_device *pldev)
{
struct net_device *dev;
struct sbmac_softc *sc;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 44/58] move sgiseeq's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (42 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 43/58] move sb1250-mac's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-28 10:45 ` Ralf Baechle
2009-03-27 23:27 ` [PATCH 45/58] move sgivwfb's " Uwe Kleine-König
` (13 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Wang Chen, David S. Miller, Jeff Garzik,
Thomas Bogendoerfer, Ralf Baechle
A pointer to sgiseeq_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Wang Chen <wangchen@cn.fujitsu.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
---
drivers/net/sgiseeq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c
index 97d6856..c95da7a 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -709,7 +709,7 @@ static inline void setup_rx_ring(struct net_device *dev,
dma_sync_desc_dev(dev, &buf[i]);
}
-static int __init sgiseeq_probe(struct platform_device *pdev)
+static int __devinit sgiseeq_probe(struct platform_device *pdev)
{
struct sgiseeq_platform_data *pd = pdev->dev.platform_data;
struct hpc3_regs *hpcregs = pd->hpc;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 44/58] move sgiseeq's probe function to .devinit.text
2009-03-27 23:27 ` [PATCH 44/58] move sgiseeq's " Uwe Kleine-König
@ 2009-03-28 10:45 ` Ralf Baechle
0 siblings, 0 replies; 100+ messages in thread
From: Ralf Baechle @ 2009-03-28 10:45 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Wang Chen, David S. Miller,
Jeff Garzik, Thomas Bogendoerfer
On Sat, Mar 28, 2009 at 12:27:05AM +0100, Uwe Kleine-König wrote:
> A pointer to sgiseeq_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Wang Chen <wangchen@cn.fujitsu.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Jeff Garzik <jgarzik@redhat.com>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Ralf
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 45/58] move sgivwfb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (43 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 44/58] move sgiseeq's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 46/58] move sgiwd93's " Uwe Kleine-König
` (12 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Antonino Daplas, Adrian Bunk, Christoph Hellwig
A pointer to sgivwfb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Christoph Hellwig <hch@lst.de>
---
drivers/video/sgivwfb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c
index f5252c2..ffe4273 100644
--- a/drivers/video/sgivwfb.c
+++ b/drivers/video/sgivwfb.c
@@ -745,7 +745,7 @@ int __init sgivwfb_setup(char *options)
/*
* Initialisation
*/
-static int __init sgivwfb_probe(struct platform_device *dev)
+static int __devinit sgivwfb_probe(struct platform_device *dev)
{
struct sgivw_par *par;
struct fb_info *info;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 46/58] move sgiwd93's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (44 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 45/58] move sgivwfb's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-28 10:46 ` Ralf Baechle
2009-03-27 23:27 ` [PATCH 47/58] move sharpsl-pm's " Uwe Kleine-König
` (11 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Dmitri Vorobiev, James Bottomley,
Thomas Bogendoerfer, Ralf Baechle, peter fuerst,
Henrik Kretzschmar
A pointer to sgiwd93_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: peter fuerst <post@pfrst.de>
Cc: Henrik Kretzschmar <henne@nachtwindheim.de>
---
drivers/scsi/sgiwd93.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/sgiwd93.c b/drivers/scsi/sgiwd93.c
index 0807b26..fef0e3c 100644
--- a/drivers/scsi/sgiwd93.c
+++ b/drivers/scsi/sgiwd93.c
@@ -226,7 +226,7 @@ static struct scsi_host_template sgiwd93_template = {
.use_clustering = DISABLE_CLUSTERING,
};
-static int __init sgiwd93_probe(struct platform_device *pdev)
+static int __devinit sgiwd93_probe(struct platform_device *pdev)
{
struct sgiwd93_platform_data *pd = pdev->dev.platform_data;
unsigned char *wdregs = pd->wdregs;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 46/58] move sgiwd93's probe function to .devinit.text
2009-03-27 23:27 ` [PATCH 46/58] move sgiwd93's " Uwe Kleine-König
@ 2009-03-28 10:46 ` Ralf Baechle
0 siblings, 0 replies; 100+ messages in thread
From: Ralf Baechle @ 2009-03-28 10:46 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Dmitri Vorobiev, James Bottomley,
Thomas Bogendoerfer, peter fuerst, Henrik Kretzschmar
On Sat, Mar 28, 2009 at 12:27:07AM +0100, Uwe Kleine-König wrote:
> A pointer to sgiwd93_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
> Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: peter fuerst <post@pfrst.de>
> Cc: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Ralf
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 47/58] move sharpsl-pm's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (45 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 46/58] move sgiwd93's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-28 9:32 ` Eric Miao
2009-03-27 23:27 ` [PATCH 48/58] move sh_mobile_lcdc_fb's " Uwe Kleine-König
` (10 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Dmitry Baryshkov, Russell King, Eric Miao
A pointer to sharpsl_pm_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Eric Miao <eric.miao@marvell.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
arch/arm/common/sharpsl_pm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c
index 780bbf7..e88c9ca 100644
--- a/arch/arm/common/sharpsl_pm.c
+++ b/arch/arm/common/sharpsl_pm.c
@@ -780,7 +780,7 @@ static struct platform_suspend_ops sharpsl_pm_ops = {
};
#endif
-static int __init sharpsl_pm_probe(struct platform_device *pdev)
+static int __devinit sharpsl_pm_probe(struct platform_device *pdev)
{
int ret;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 47/58] move sharpsl-pm's probe function to .devinit.text
2009-03-27 23:27 ` [PATCH 47/58] move sharpsl-pm's " Uwe Kleine-König
@ 2009-03-28 9:32 ` Eric Miao
2009-03-28 19:38 ` Uwe Kleine-König
0 siblings, 1 reply; 100+ messages in thread
From: Eric Miao @ 2009-03-28 9:32 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Dmitry Baryshkov, Russell King,
Eric Miao
2009/3/28 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> A pointer to sharpsl_pm_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
This one looks OK to me.
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: Eric Miao <eric.miao@marvell.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> arch/arm/common/sharpsl_pm.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c
> index 780bbf7..e88c9ca 100644
> --- a/arch/arm/common/sharpsl_pm.c
> +++ b/arch/arm/common/sharpsl_pm.c
> @@ -780,7 +780,7 @@ static struct platform_suspend_ops sharpsl_pm_ops = {
> };
> #endif
>
> -static int __init sharpsl_pm_probe(struct platform_device *pdev)
> +static int __devinit sharpsl_pm_probe(struct platform_device *pdev)
> {
> int ret;
>
> --
> 1.6.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Cheers
- eric
^ permalink raw reply [flat|nested] 100+ messages in thread* Re: [PATCH 47/58] move sharpsl-pm's probe function to .devinit.text
2009-03-28 9:32 ` Eric Miao
@ 2009-03-28 19:38 ` Uwe Kleine-König
2009-03-29 1:23 ` Eric Miao
0 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-28 19:38 UTC (permalink / raw)
To: Eric Miao
Cc: linux-kernel, Andrew Morton, Dmitry Baryshkov, Russell King,
Eric Miao
On Sat, Mar 28, 2009 at 05:32:02PM +0800, Eric Miao wrote:
> 2009/3/28 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> > A pointer to sharpsl_pm_probe is passed to the core via
> > platform_driver_register and so the function must not disappear when the
> > .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> > unbinding and binding a device to the driver via sysfs will result in an
> > oops as does a device being registered late.
> >
> > An alternative to this patch is using platform_driver_probe instead of
> > platform_driver_register plus removing the pointer to the probe function
> > from the struct platform_driver.
> >
>
> This one looks OK to me.
I assume this is an Acked-by: you?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 100+ messages in thread
* Re: [PATCH 47/58] move sharpsl-pm's probe function to .devinit.text
2009-03-28 19:38 ` Uwe Kleine-König
@ 2009-03-29 1:23 ` Eric Miao
0 siblings, 0 replies; 100+ messages in thread
From: Eric Miao @ 2009-03-29 1:23 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Dmitry Baryshkov, Russell King,
Eric Miao
2009/3/29 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> On Sat, Mar 28, 2009 at 05:32:02PM +0800, Eric Miao wrote:
>> 2009/3/28 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
>> > A pointer to sharpsl_pm_probe is passed to the core via
>> > platform_driver_register and so the function must not disappear when the
>> > .init sections are discarded. Otherwise (if also having HOTPLUG=y)
>> > unbinding and binding a device to the driver via sysfs will result in an
>> > oops as does a device being registered late.
>> >
>> > An alternative to this patch is using platform_driver_probe instead of
>> > platform_driver_register plus removing the pointer to the probe function
>> > from the struct platform_driver.
>> >
>>
>> This one looks OK to me.
> I assume this is an Acked-by: you?
>
Acked-by: Eric Miao <eric.miao@marvell.com>
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-König |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
>
--
Cheers
- eric
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 48/58] move sh_mobile_lcdc_fb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (46 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 47/58] move sharpsl-pm's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 49/58] move snd_powermac's " Uwe Kleine-König
` (9 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Greg Kroah-Hartman, Magnus Damm, Paul Mundt,
Krzysztof Helt
A pointer to sh_mobile_lcdc_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Magnus Damm <damm@igel.co.jp>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/sh_mobile_lcdcfb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 92ea0ab..ba795e2 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -704,7 +704,7 @@ static struct dev_pm_ops sh_mobile_lcdc_dev_pm_ops = {
static int sh_mobile_lcdc_remove(struct platform_device *pdev);
-static int __init sh_mobile_lcdc_probe(struct platform_device *pdev)
+static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev)
{
struct fb_info *info;
struct sh_mobile_lcdc_priv *priv;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 49/58] move snd_powermac's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (47 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 48/58] move sh_mobile_lcdc_fb's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-04-06 2:09 ` Takashi Iwai
2009-03-27 23:27 ` [PATCH 50/58] move snirm_53c710's " Uwe Kleine-König
` (8 subsequent siblings)
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Takashi Iwai, Jaroslav Kysela, Johannes Berg,
Rene Herman
A pointer to snd_pmac_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (when having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Rene Herman <rene.herman@keyaccess.nl>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
sound/ppc/powermac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c
index 5a92906..a2b69b8 100644
--- a/sound/ppc/powermac.c
+++ b/sound/ppc/powermac.c
@@ -51,7 +51,7 @@ static struct platform_device *device;
/*
*/
-static int __init snd_pmac_probe(struct platform_device *devptr)
+static int __devinit snd_pmac_probe(struct platform_device *devptr)
{
struct snd_card *card;
struct snd_pmac *chip;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 49/58] move snd_powermac's probe function to .devinit.text
2009-03-27 23:27 ` [PATCH 49/58] move snd_powermac's " Uwe Kleine-König
@ 2009-04-06 2:09 ` Takashi Iwai
0 siblings, 0 replies; 100+ messages in thread
From: Takashi Iwai @ 2009-04-06 2:09 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Takashi Iwai, Jaroslav Kysela,
Johannes Berg, Rene Herman
At Sat, 28 Mar 2009 00:27:10 +0100,
Uwe Kleine-König wrote:
>
> A pointer to snd_pmac_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (when having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Cc: Rene Herman <rene.herman@keyaccess.nl>
> Cc: Andrew Morton <akpm@linux-foundation.org>
Applied now to sound git tree. Thanks.
Takashi
> ---
> sound/ppc/powermac.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c
> index 5a92906..a2b69b8 100644
> --- a/sound/ppc/powermac.c
> +++ b/sound/ppc/powermac.c
> @@ -51,7 +51,7 @@ static struct platform_device *device;
> /*
> */
>
> -static int __init snd_pmac_probe(struct platform_device *devptr)
> +static int __devinit snd_pmac_probe(struct platform_device *devptr)
> {
> struct snd_card *card;
> struct snd_pmac *chip;
> --
> 1.6.2
>
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 50/58] move snirm_53c710's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (48 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 49/58] move snd_powermac's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 51/58] move stk17ta8's " Uwe Kleine-König
` (7 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Kay Sievers, David Brownell, James Bottomley,
Thomas Bogendoerfer
A pointer to snirm710_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
---
drivers/scsi/sni_53c710.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/sni_53c710.c b/drivers/scsi/sni_53c710.c
index 77f0b2c..9d22539 100644
--- a/drivers/scsi/sni_53c710.c
+++ b/drivers/scsi/sni_53c710.c
@@ -64,7 +64,7 @@ static struct scsi_host_template snirm710_template = {
.module = THIS_MODULE,
};
-static int __init snirm710_probe(struct platform_device *dev)
+static int __devinit snirm710_probe(struct platform_device *dev)
{
unsigned long base;
struct NCR_700_Host_Parameters *hostdata;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 51/58] move stk17ta8's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (49 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 50/58] move snirm_53c710's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 52/58] move twl4030_usb's " Uwe Kleine-König
` (6 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Anton Vorontsov, Alessandro Zummo, David Brownell,
Paul Mundt, Hannes Eder, Jiri Kosina
A pointer to stk17ta8_rtc_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Hannes Eder <hannes@hanneseder.net>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: David Brownell <dbrownell@users.sourceforge.net>
---
drivers/rtc/rtc-stk17ta8.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c
index 7d1547b..d491eb2 100644
--- a/drivers/rtc/rtc-stk17ta8.c
+++ b/drivers/rtc/rtc-stk17ta8.c
@@ -286,7 +286,7 @@ static struct bin_attribute stk17ta8_nvram_attr = {
.write = stk17ta8_nvram_write,
};
-static int __init stk17ta8_rtc_probe(struct platform_device *pdev)
+static int __devinit stk17ta8_rtc_probe(struct platform_device *pdev)
{
struct rtc_device *rtc;
struct resource *res;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 52/58] move twl4030_usb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (50 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 51/58] move stk17ta8's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 53/58] move omap_udc's " Uwe Kleine-König
` (5 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Jouni Hogander, Kalle Jokiniemi,
Greg Kroah-Hartman, David Brownell, Tony Lindgren, Kevin Hilman,
Felipe Balbi
A pointer to twl4030_usb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jouni Hogander <jouni.hogander@nokia.com>
Cc: Kalle Jokiniemi <kalle.jokiniemi@digia.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
---
drivers/usb/otg/twl4030-usb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index d9478d0..c34e639 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -641,7 +641,7 @@ static int twl4030_set_host(struct otg_transceiver *x, struct usb_bus *host)
return 0;
}
-static int __init twl4030_usb_probe(struct platform_device *pdev)
+static int __devinit twl4030_usb_probe(struct platform_device *pdev)
{
struct twl4030_usb_data *pdata = pdev->dev.platform_data;
struct twl4030_usb *twl;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 53/58] move omap_udc's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (51 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 52/58] move twl4030_usb's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 54/58] move vesafb's " Uwe Kleine-König
` (4 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Philipp Zabel, David Brownell, Greg Kroah-Hartman,
Tony Lindgren, Russell King, Dmitry Baryshkov
A pointer to omap_udc_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
---
drivers/usb/gadget/omap_udc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index 57d9641..17755f5 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -2800,7 +2800,7 @@ omap_udc_setup(struct platform_device *odev, struct otg_transceiver *xceiv)
return 0;
}
-static int __init omap_udc_probe(struct platform_device *pdev)
+static int __devinit omap_udc_probe(struct platform_device *pdev)
{
int status = -ENODEV;
int hmc;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 54/58] move vesafb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (52 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 53/58] move omap_udc's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 55/58] move vfb's " Uwe Kleine-König
` (3 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Helge Deller, James Simmons, Antonino Daplas
A pointer to vesafb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Helge Deller <deller@gmx.de>
Cc: James Simmons <jsimmons@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Antonino Daplas <adaplas@pol.net>
---
drivers/video/vesafb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c
index e16322d..9022063 100644
--- a/drivers/video/vesafb.c
+++ b/drivers/video/vesafb.c
@@ -217,7 +217,7 @@ static int __init vesafb_setup(char *options)
return 0;
}
-static int __init vesafb_probe(struct platform_device *dev)
+static int __devinit vesafb_probe(struct platform_device *dev)
{
struct fb_info *info;
int i, err;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 55/58] move vfb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (53 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 54/58] move vesafb's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 56/58] move vga16fb's " Uwe Kleine-König
` (2 subsequent siblings)
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Frans Pop, Antonino Daplas, Krzysztof Helt
A pointer to vfb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Frans Pop <elendil@planet.nl>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/vfb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c
index 93fe08d..5ee6bdb 100644
--- a/drivers/video/vfb.c
+++ b/drivers/video/vfb.c
@@ -476,7 +476,7 @@ static int __init vfb_setup(char *options)
* Initialisation
*/
-static int __init vfb_probe(struct platform_device *dev)
+static int __devinit vfb_probe(struct platform_device *dev)
{
struct fb_info *info;
int retval = -ENOMEM;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 56/58] move vga16fb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (54 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 55/58] move vfb's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 57/58] move w100fb's " Uwe Kleine-König
2009-03-27 23:27 ` [PATCH 58/58] move xtsonic's " Uwe Kleine-König
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Krzysztof Helt, Roel Kluin, Antonino Daplas
A pointer to vga16fb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Roel Kluin <12o3l@tiscali.nl>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/vga16fb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
index 5b29389..76d8dae 100644
--- a/drivers/video/vga16fb.c
+++ b/drivers/video/vga16fb.c
@@ -1293,7 +1293,7 @@ static int vga16fb_setup(char *options)
}
#endif
-static int __init vga16fb_probe(struct platform_device *dev)
+static int __devinit vga16fb_probe(struct platform_device *dev)
{
struct fb_info *info;
struct vga16fb_par *par;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* [PATCH 57/58] move w100fb's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (55 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 56/58] move vga16fb's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
2009-03-28 10:01 ` pHilipp Zabel
2009-03-27 23:27 ` [PATCH 58/58] move xtsonic's " Uwe Kleine-König
57 siblings, 1 reply; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Philipp Zabel, Ian Molton, Richard Purdie,
Antonino Daplas, Alberto Mardegan
A pointer to w100fb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Ian Molton <spyro@f2s.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Alberto Mardegan <mardy@users.sourceforge.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/w100fb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
index d0674f1..c966b12 100644
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -626,7 +626,7 @@ static int w100fb_resume(struct platform_device *dev)
#endif
-int __init w100fb_probe(struct platform_device *pdev)
+int __devinit w100fb_probe(struct platform_device *pdev)
{
int err = -EIO;
struct w100fb_mach_info *inf;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 57/58] move w100fb's probe function to .devinit.text
2009-03-27 23:27 ` [PATCH 57/58] move w100fb's " Uwe Kleine-König
@ 2009-03-28 10:01 ` pHilipp Zabel
2009-03-28 19:13 ` Uwe Kleine-König
0 siblings, 1 reply; 100+ messages in thread
From: pHilipp Zabel @ 2009-03-28 10:01 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-kernel, Andrew Morton, Ian Molton, Richard Purdie,
Antonino Daplas, Alberto Mardegan
2009/3/28 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> A pointer to w100fb_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
The ATI Imageon chips handled by this driver are not hotpluggable,
I think the proposed alternative is the right way.
Also, shouldn't w100fb_init be moved from __devinit to __init and
w100fb_remove be put into __exit?
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Philipp Zabel <philipp.zabel@gmail.com>
> Cc: Ian Molton <spyro@f2s.com>
> Cc: Richard Purdie <rpurdie@rpsys.net>
> Cc: Antonino Daplas <adaplas@gmail.com>
> Cc: Alberto Mardegan <mardy@users.sourceforge.net>
> Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/w100fb.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
index d0674f1..157e7bd 100644
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -781,7 +781,7 @@ out:
}
-static int w100fb_remove(struct platform_device *pdev)
+static int __exit w100fb_remove(struct platform_device *pdev)
{
struct fb_info *info = platform_get_drvdata(pdev);
struct w100fb_par *par=info->par;
@@ -1609,8 +1609,7 @@ static void w100_vsync(void)
}
static struct platform_driver w100fb_driver = {
- .probe = w100fb_probe,
- .remove = w100fb_remove,
+ .remove = __exit_p(w100fb_remove),
.suspend = w100fb_suspend,
.resume = w100fb_resume,
.driver = {
@@ -1618,9 +1617,9 @@ static struct platform_driver w100fb_driver = {
},
};
-int __devinit w100fb_init(void)
+int __init w100fb_init(void)
{
- return platform_driver_register(&w100fb_driver);
+ return platform_driver_probe(&w100fb_driver, w100fb_probe);
}
void __exit w100fb_cleanup(void)
--
1.6.2.1
^ permalink raw reply related [flat|nested] 100+ messages in thread* Re: [PATCH 57/58] move w100fb's probe function to .devinit.text
2009-03-28 10:01 ` pHilipp Zabel
@ 2009-03-28 19:13 ` Uwe Kleine-König
0 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-28 19:13 UTC (permalink / raw)
To: pHilipp Zabel
Cc: linux-kernel, Andrew Morton, Ian Molton, Richard Purdie,
Antonino Daplas, Alberto Mardegan
Hellp pHilipp,
On Sat, Mar 28, 2009 at 11:01:10AM +0100, pHilipp Zabel wrote:
> 2009/3/28 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> > A pointer to w100fb_probe is passed to the core via
> > platform_driver_register and so the function must not disappear when the
> > .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> > unbinding and binding a device to the driver via sysfs will result in an
> > oops as does a device being registered late.
> >
> > An alternative to this patch is using platform_driver_probe instead of
> > platform_driver_register plus removing the pointer to the probe function
> > from the struct platform_driver.
>
> The ATI Imageon chips handled by this driver are not hotpluggable,
what about
sysdriverdir=/sys/bus/platform/drivers/w100fb
echo -n w100fb > $sysdriverdir/unbind
echo -n w100fb > $sysdriverdir/bind
? (You might have to use w100fb.0 (or another integer id), didn't check
> I think the proposed alternative is the right way.
> Also, shouldn't w100fb_init be moved from __devinit to __init and
> w100fb_remove be put into __exit?
I concentrated for now on the probe functions, primarily because a wrong
section can result in an oops. If a function is in __devinit instead of
__init the only harm is that it occupies RAM.
Other than that your change looks good.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 100+ messages in thread
* [PATCH 58/58] move xtsonic's probe function to .devinit.text
2009-03-27 23:21 [RESENT] platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
` (56 preceding siblings ...)
2009-03-27 23:27 ` [PATCH 57/58] move w100fb's " Uwe Kleine-König
@ 2009-03-27 23:27 ` Uwe Kleine-König
57 siblings, 0 replies; 100+ messages in thread
From: Uwe Kleine-König @ 2009-03-27 23:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Chris Zankel, David S. Miller
A pointer to xtsonic_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Chris Zankel <chris@zankel.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/xtsonic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/xtsonic.c b/drivers/net/xtsonic.c
index a12a721..10f69f8 100644
--- a/drivers/net/xtsonic.c
+++ b/drivers/net/xtsonic.c
@@ -232,7 +232,7 @@ out:
* Actually probing is superfluous but we're paranoid.
*/
-int __init xtsonic_probe(struct platform_device *pdev)
+int __devinit xtsonic_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct sonic_local *lp;
--
1.6.2
^ permalink raw reply related [flat|nested] 100+ messages in thread