All of lore.kernel.org
 help / color / mirror / Atom feed
* platform_driver's probe functions must not be located in .init.text
@ 2009-01-12 22:12 Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move acornfb's probe function to .devinit.text Uwe Kleine-König
                   ` (62 more replies)
  0 siblings, 63 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:12 UTC (permalink / raw)
  To: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 7988 bytes --]

Hello,

if the probe function of a platform_driver lives in .init.text (i.e. is
defined using __init) registering a device after the .init sections are
discarded results in an oops.  You can test that by doing

	echo $drivername.$somevalidid > /sys/bus/platform/drivers/$drivername/unbind
	echo $drivername.$somevalidid > /sys/bus/platform/drivers/$drivername/bind

As a reply to this mail I send 62 patches that fix this kind of error by
moving the respective probe functions to .devinit.text.

This should be safe in general as it only increases the lifetime for the
respective functions.

The alternative is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.  But I choosed changing the section as
this is less intrusive though probably the latter would be the better
fix because it saves some memory.

You cannot blindly change to use platform_driver_probe because if the
devices are only registered after that call (but while .init is still
valid) the driver is already gone.  This is hardly checkable for me
because I don't have the hardware for most drivers I fixed.

Shortlog and diffstat are below.  You can fetch this series from

	git://git.pengutronix.de/git/ukl/linux-2.6.git platsection-master

based on v2.6.29-rc1.

Best regards
Uwe

Uwe Kleine-König (62):
      move acornfb's probe function to .devinit.text
      move am79c961's probe function to .devinit.text
      move arcfb's probe function to .devinit.text
      move at91_ether's probe function to .devinit.text
      move at91_wdt's probe function to .devinit.text
      move bf54x-lq043's probe function to .devinit.text
      move bfin-t350mcqb's probe function to .devinit.text
      move cfag12864bfb's probe function to .devinit.text
      move leds-clevo-mail's probe function to .devinit.text
      move cobalt-lcd's probe function to .devinit.text
      move corgi-keyboard's probe function to .devinit.text
      move corgi-ssp's probe function to .devinit.text
      move corgi-ts's probe function to .devinit.text
      move efifb's probe function to .devinit.text
      move orion-ehci's probe function to .devinit.text
      move epson1355fb's probe function to .devinit.text
      move sh_flctl's probe function to .devinit.text
      move gbefb's probe function to .devinit.text
      move h1940-bt's probe function to .devinit.text
      move h1940-leds's probe function to .devinit.text
      move hgafb's probe function to .devinit.text
      move hitfb's probe function to .devinit.text
      move hp680-bl's probe function to .devinit.text
      move hp-wmi's probe function to .devinit.text
      move jazzsonic's probe function to .devinit.text
      move jornada_ssp's probe function to .devinit.text
      move ks8695_wdt's probe function to .devinit.text
      move macsonic's probe function to .devinit.text
      move meth's probe function to .devinit.text
      move mmci-omap's probe function to .devinit.text
      move mailbox's probe function to .devinit.text
      move omap24xxcam's probe function to .devinit.text
      move mailbox's probe function to .devinit.text
      move omap_hdq's probe function to .devinit.text
      move omap-keypad's probe function to .devinit.text
      move omap_rng's probe function to .devinit.text
      move omap_wdt's probe function to .devinit.text
      move orion_nand's probe function to .devinit.text
      move gen_nand's probe function to .devinit.text
      move q40fb's probe function to .devinit.text
      move r8a66597_hcd's probe function to .devinit.text
      move s3c241xfb's probe function to .devinit.text
      move sa11x0-fb's probe function to .devinit.text
      move flash's probe function to .devinit.text
      move sb1250-mac's probe function to .devinit.text
      move sgiseeq's probe function to .devinit.text
      move sgivwfb's probe function to .devinit.text
      move sgiwd93's probe function to .devinit.text
      move sharpsl-pm's probe function to .devinit.text
      move sh_mobile_lcdc_fb's probe function to .devinit.text
      move snd_powermac's probe function to .devinit.text
      move snirm_53c710's probe function to .devinit.text
      move spitz-keyboard's probe function to .devinit.text
      move stk17ta8's probe function to .devinit.text
      move omap_udc's probe function to .devinit.text
      move vesafb's probe function to .devinit.text
      move vfb's probe function to .devinit.text
      move vga16fb's probe function to .devinit.text
      move w100fb's probe function to .devinit.text
      move wm8400-regulator's probe function to .devinit.text
      move xilinx_spi's probe function to .devinit.text
      move xtsonic's probe function to .devinit.text

 arch/arm/common/sharpsl_pm.c            |    2 +-
 arch/arm/mach-omap1/mailbox.c           |    2 +-
 arch/arm/mach-omap2/mailbox.c           |    2 +-
 arch/arm/mach-pxa/corgi_ssp.c           |    2 +-
 arch/arm/mach-s3c2410/h1940-bluetooth.c |    2 +-
 arch/arm/mach-sa1100/jornada720_ssp.c   |    2 +-
 drivers/auxdisplay/cfag12864bfb.c       |    2 +-
 drivers/char/hw_random/omap-rng.c       |    2 +-
 drivers/input/keyboard/corgikbd.c       |    2 +-
 drivers/input/keyboard/omap-keypad.c    |    2 +-
 drivers/input/keyboard/spitzkbd.c       |    2 +-
 drivers/input/touchscreen/corgi_ts.c    |    2 +-
 drivers/leds/leds-clevo-mail.c          |    2 +-
 drivers/leds/leds-h1940.c               |    2 +-
 drivers/media/video/omap24xxcam.c       |    2 +-
 drivers/mmc/host/omap.c                 |    2 +-
 drivers/mtd/maps/sa1100-flash.c         |    2 +-
 drivers/mtd/nand/orion_nand.c           |    2 +-
 drivers/mtd/nand/plat_nand.c            |    2 +-
 drivers/mtd/nand/sh_flctl.c             |    2 +-
 drivers/net/arm/am79c961a.c             |    2 +-
 drivers/net/arm/at91_ether.c            |    2 +-
 drivers/net/jazzsonic.c                 |    2 +-
 drivers/net/macsonic.c                  |    2 +-
 drivers/net/meth.c                      |    2 +-
 drivers/net/sb1250-mac.c                |    2 +-
 drivers/net/sgiseeq.c                   |    2 +-
 drivers/net/xtsonic.c                   |    2 +-
 drivers/platform/x86/hp-wmi.c           |    4 ++--
 drivers/regulator/wm8400-regulator.c    |    2 +-
 drivers/rtc/rtc-stk17ta8.c              |    2 +-
 drivers/scsi/sgiwd93.c                  |    2 +-
 drivers/scsi/sni_53c710.c               |    2 +-
 drivers/spi/xilinx_spi.c                |    2 +-
 drivers/usb/gadget/omap_udc.c           |    2 +-
 drivers/usb/host/ehci-orion.c           |    2 +-
 drivers/usb/host/r8a66597-hcd.c         |    2 +-
 drivers/video/acornfb.c                 |    2 +-
 drivers/video/arcfb.c                   |    2 +-
 drivers/video/backlight/hp680_bl.c      |    2 +-
 drivers/video/bf54x-lq043fb.c           |    2 +-
 drivers/video/bfin-t350mcqb-fb.c        |    2 +-
 drivers/video/cobalt_lcdfb.c            |    2 +-
 drivers/video/efifb.c                   |    2 +-
 drivers/video/epson1355fb.c             |    2 +-
 drivers/video/gbefb.c                   |    2 +-
 drivers/video/hgafb.c                   |    2 +-
 drivers/video/hitfb.c                   |    2 +-
 drivers/video/q40fb.c                   |    2 +-
 drivers/video/s3c2410fb.c               |    4 ++--
 drivers/video/sa1100fb.c                |    2 +-
 drivers/video/sgivwfb.c                 |    2 +-
 drivers/video/sh_mobile_lcdcfb.c        |    2 +-
 drivers/video/vesafb.c                  |    2 +-
 drivers/video/vfb.c                     |    2 +-
 drivers/video/vga16fb.c                 |    2 +-
 drivers/video/w100fb.c                  |    2 +-
 drivers/w1/masters/omap_hdq.c           |    4 ++--
 drivers/watchdog/at91rm9200_wdt.c       |    2 +-
 drivers/watchdog/ks8695_wdt.c           |    2 +-
 drivers/watchdog/omap_wdt.c             |    2 +-
 sound/ppc/powermac.c                    |    2 +-
 62 files changed, 65 insertions(+), 65 deletions(-)

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [PATCH] move acornfb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move am79c961's " Uwe Kleine-König
                   ` (61 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move am79c961's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move acornfb's probe function to .devinit.text Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move arcfb's " Uwe Kleine-König
                   ` (60 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 0c628a9..188f739 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move arcfb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move acornfb's probe function to .devinit.text Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move am79c961's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move at91_ether's " Uwe Kleine-König
                   ` (59 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move at91_ether's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (2 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move arcfb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move at91_wdt's " Uwe Kleine-König
                   ` (58 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move at91_wdt's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (3 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move at91_ether's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move bf54x-lq043's " Uwe Kleine-König
                   ` (57 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 993e5f5..436c811 100644
--- a/drivers/watchdog/at91rm9200_wdt.c
+++ b/drivers/watchdog/at91rm9200_wdt.c
@@ -196,7 +196,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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move bf54x-lq043's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (4 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move at91_wdt's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move bfin-t350mcqb's " Uwe Kleine-König
                   ` (56 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 7644ed2..3e7c3d6 100644
--- a/drivers/video/bf54x-lq043fb.c
+++ b/drivers/video/bf54x-lq043fb.c
@@ -517,7 +517,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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move bfin-t350mcqb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (5 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move bf54x-lq043's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move cfag12864bfb's " Uwe Kleine-König
                   ` (55 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

A pointer to bfin_t350mcqb_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>
---
 drivers/video/bfin-t350mcqb-fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c
index a9b3ada..b7ffd9e 100644
--- a/drivers/video/bfin-t350mcqb-fb.c
+++ b/drivers/video/bfin-t350mcqb-fb.c
@@ -434,7 +434,7 @@ static irqreturn_t bfin_t350mcqb_irq_error(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static int __init bfin_t350mcqb_probe(struct platform_device *pdev)
+static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev)
 {
 	struct bfin_t350mcqbfb_info *info;
 	struct fb_info *fbinfo;
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move cfag12864bfb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (6 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move bfin-t350mcqb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-20  8:13   ` Miguel Ojeda
  2009-01-12 22:24 ` [PATCH] move leds-clevo-mail's " Uwe Kleine-König
                   ` (54 subsequent siblings)
  62 siblings, 1 reply; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move leds-clevo-mail's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (7 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move cfag12864bfb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move cobalt-lcd's " Uwe Kleine-König
                   ` (53 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move cobalt-lcd's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (8 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move leds-clevo-mail's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move corgi-keyboard's " Uwe Kleine-König
                   ` (52 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move corgi-keyboard's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (9 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move cobalt-lcd's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-13  6:20   ` Dmitry Torokhov
  2009-01-12 22:24 ` [PATCH] move corgi-ssp's " Uwe Kleine-König
                   ` (51 subsequent siblings)
  62 siblings, 1 reply; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

A pointer to corgikbd_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>
---
 drivers/input/keyboard/corgikbd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c
index c8ed065..21efc31 100644
--- a/drivers/input/keyboard/corgikbd.c
+++ b/drivers/input/keyboard/corgikbd.c
@@ -288,7 +288,7 @@ static int corgikbd_resume(struct platform_device *dev)
 #define corgikbd_resume		NULL
 #endif
 
-static int __init corgikbd_probe(struct platform_device *pdev)
+static int __devinit corgikbd_probe(struct platform_device *pdev)
 {
 	struct corgikbd *corgikbd;
 	struct input_dev *input_dev;
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move corgi-ssp's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (10 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move corgi-keyboard's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move corgi-ts's " Uwe Kleine-König
                   ` (50 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move corgi-ts's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (11 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move corgi-ssp's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-13  6:20   ` Dmitry Torokhov
  2009-01-12 22:24 ` [PATCH] move efifb's " Uwe Kleine-König
                   ` (49 subsequent siblings)
  62 siblings, 1 reply; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

A pointer to corgits_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>
---
 drivers/input/touchscreen/corgi_ts.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c
index 65202c9..af39019 100644
--- a/drivers/input/touchscreen/corgi_ts.c
+++ b/drivers/input/touchscreen/corgi_ts.c
@@ -268,7 +268,7 @@ static int corgits_resume(struct platform_device *dev)
 #define corgits_resume		NULL
 #endif
 
-static int __init corgits_probe(struct platform_device *pdev)
+static int __devinit corgits_probe(struct platform_device *pdev)
 {
 	struct corgi_ts *corgi_ts;
 	struct input_dev *input_dev;
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move efifb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (12 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move corgi-ts's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move orion-ehci's " Uwe Kleine-König
                   ` (48 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move orion-ehci's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (13 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move efifb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move epson1355fb's " Uwe Kleine-König
                   ` (47 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move epson1355fb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (14 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move orion-ehci's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move sh_flctl's " Uwe Kleine-König
                   ` (46 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move sh_flctl's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (15 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move epson1355fb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move gbefb's " Uwe Kleine-König
                   ` (45 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move gbefb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (16 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move sh_flctl's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move h1940-bt's " Uwe Kleine-König
                   ` (44 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move h1940-bt's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (17 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move gbefb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move h1940-leds's " Uwe Kleine-König
                   ` (43 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move h1940-leds's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (18 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move h1940-bt's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move hgafb's " Uwe Kleine-König
                   ` (42 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move hgafb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (19 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move h1940-leds's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move hitfb's " Uwe Kleine-König
                   ` (41 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move hitfb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (20 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move hgafb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move hp680-bl's " Uwe Kleine-König
                   ` (40 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move hp680-bl's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (21 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move hitfb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move hp-wmi's " Uwe Kleine-König
                   ` (39 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move hp-wmi's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (22 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move hp680-bl's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move jazzsonic's " Uwe Kleine-König
                   ` (38 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 7c789f0..cbf2df6 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 {
@@ -404,7 +404,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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move jazzsonic's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (23 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move hp-wmi's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move jornada_ssp's " Uwe Kleine-König
                   ` (37 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 334ff9e..b61d705 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -202,7 +202,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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move jornada_ssp's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (24 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move jazzsonic's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move ks8695_wdt's " Uwe Kleine-König
                   ` (36 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move ks8695_wdt's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (25 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move jornada_ssp's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move macsonic's " Uwe Kleine-König
                   ` (35 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 0b798fd..e71dfad 100644
--- a/drivers/watchdog/ks8695_wdt.c
+++ b/drivers/watchdog/ks8695_wdt.c
@@ -220,7 +220,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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move macsonic's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (26 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move ks8695_wdt's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move meth's " Uwe Kleine-König
                   ` (34 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 205bb05..d618fd1 100644
--- a/drivers/net/macsonic.c
+++ b/drivers/net/macsonic.c
@@ -554,7 +554,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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move meth's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (27 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move macsonic's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move mmci-omap's " Uwe Kleine-König
                   ` (33 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move mmci-omap's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (28 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move meth's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move mailbox's " Uwe Kleine-König
                   ` (32 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move mailbox's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (29 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move mmci-omap's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move omap24xxcam's " Uwe Kleine-König
                   ` (31 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move omap24xxcam's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (30 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move mailbox's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move mailbox's " Uwe Kleine-König
                   ` (30 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move mailbox's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (31 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move omap24xxcam's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move omap_hdq's " Uwe Kleine-König
                   ` (29 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move omap_hdq's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (32 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move mailbox's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move omap-keypad's " Uwe Kleine-König
                   ` (28 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move omap-keypad's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (33 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move omap_hdq's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-14  5:34   ` Dmitry Torokhov
  2009-01-12 22:24 ` [PATCH] move omap_rng's " Uwe Kleine-König
                   ` (27 subsequent siblings)
  62 siblings, 1 reply; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

A pointer to omap_kp_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>
---
 drivers/input/keyboard/omap-keypad.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
index 3f3d119..83ac16d 100644
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -279,7 +279,7 @@ static int omap_kp_resume(struct platform_device *dev)
 #define omap_kp_resume	NULL
 #endif
 
-static int __init omap_kp_probe(struct platform_device *pdev)
+static int __devinit omap_kp_probe(struct platform_device *pdev)
 {
 	struct omap_kp *omap_kp;
 	struct input_dev *input_dev;
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move omap_rng's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (34 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move omap-keypad's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move omap_wdt's " Uwe Kleine-König
                   ` (26 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 d4e7dca..3f14506 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move omap_wdt's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (35 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move omap_rng's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move orion_nand's " Uwe Kleine-König
                   ` (25 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move orion_nand's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (36 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move omap_wdt's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move gen_nand's " Uwe Kleine-König
                   ` (24 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 917cf8d..26f466f 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move gen_nand's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (37 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move orion_nand's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move q40fb's " Uwe Kleine-König
                   ` (23 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move q40fb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (38 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move gen_nand's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move r8a66597_hcd's " Uwe Kleine-König
                   ` (22 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move r8a66597_hcd's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (39 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move q40fb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move s3c241xfb's " Uwe Kleine-König
                   ` (21 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 3190412..b5adc4a 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -2275,7 +2275,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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move s3c241xfb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (40 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move r8a66597_hcd's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move sa11x0-fb's " Uwe Kleine-König
                   ` (20 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move sa11x0-fb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (41 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move s3c241xfb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move flash's " Uwe Kleine-König
                   ` (19 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move flash's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (42 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move sa11x0-fb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move sb1250-mac's " Uwe Kleine-König
                   ` (18 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 7df6bbf..424d1b5 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move sb1250-mac's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (43 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move flash's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move sgiseeq's " Uwe Kleine-König
                   ` (17 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 31e38fa..2e7e0a2 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move sgiseeq's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (44 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move sb1250-mac's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move sgivwfb's " Uwe Kleine-König
                   ` (16 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move sgivwfb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (45 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move sgiseeq's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move sgiwd93's " Uwe Kleine-König
                   ` (15 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move sgiwd93's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (46 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move sgivwfb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move sharpsl-pm's " Uwe Kleine-König
                   ` (14 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move sharpsl-pm's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (47 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move sgiwd93's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move sh_mobile_lcdc_fb's " Uwe Kleine-König
                   ` (13 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move sh_mobile_lcdc_fb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (48 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move sharpsl-pm's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move snd_powermac's " Uwe Kleine-König
                   ` (12 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 0e2b8fd..89d0f1a 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -656,7 +656,7 @@ static int sh_mobile_lcdc_set_bpp(struct fb_var_screeninfo *var, int bpp)
 
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move snd_powermac's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (49 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move sh_mobile_lcdc_fb's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move snirm_53c710's " Uwe Kleine-König
                   ` (11 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 c936225..c95c30d 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move snirm_53c710's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (50 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move snd_powermac's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:24 ` [PATCH] move spitz-keyboard's " Uwe Kleine-König
                   ` (10 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move spitz-keyboard's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (51 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move snirm_53c710's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-14  5:34   ` Dmitry Torokhov
  2009-01-12 22:24 ` [PATCH] move stk17ta8's " Uwe Kleine-König
                   ` (9 subsequent siblings)
  62 siblings, 1 reply; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

A pointer to spitzkbd_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>
---
 drivers/input/keyboard/spitzkbd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c
index c48b76a..f82fb9d 100644
--- a/drivers/input/keyboard/spitzkbd.c
+++ b/drivers/input/keyboard/spitzkbd.c
@@ -343,7 +343,7 @@ static int spitzkbd_resume(struct platform_device *dev)
 #define spitzkbd_resume		NULL
 #endif
 
-static int __init spitzkbd_probe(struct platform_device *dev)
+static int __devinit spitzkbd_probe(struct platform_device *dev)
 {
 	struct spitzkbd *spitzkbd;
 	struct input_dev *input_dev;
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move stk17ta8's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (52 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move spitz-keyboard's " Uwe Kleine-König
@ 2009-01-12 22:24 ` Uwe Kleine-König
  2009-01-12 22:25 ` [PATCH] move omap_udc's " Uwe Kleine-König
                   ` (8 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:24 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move omap_udc's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (53 preceding siblings ...)
  2009-01-12 22:24 ` [PATCH] move stk17ta8's " Uwe Kleine-König
@ 2009-01-12 22:25 ` Uwe Kleine-König
  2009-01-12 22:25 ` [PATCH] move vesafb's " Uwe Kleine-König
                   ` (7 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:25 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move vesafb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (54 preceding siblings ...)
  2009-01-12 22:25 ` [PATCH] move omap_udc's " Uwe Kleine-König
@ 2009-01-12 22:25 ` Uwe Kleine-König
  2009-01-12 22:25 ` [PATCH] move vfb's " Uwe Kleine-König
                   ` (6 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:25 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move vfb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (55 preceding siblings ...)
  2009-01-12 22:25 ` [PATCH] move vesafb's " Uwe Kleine-König
@ 2009-01-12 22:25 ` Uwe Kleine-König
  2009-01-12 22:25 ` [PATCH] move vga16fb's " Uwe Kleine-König
                   ` (5 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:25 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move vga16fb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (56 preceding siblings ...)
  2009-01-12 22:25 ` [PATCH] move vfb's " Uwe Kleine-König
@ 2009-01-12 22:25 ` Uwe Kleine-König
  2009-01-12 22:25 ` [PATCH] move w100fb's " Uwe Kleine-König
                   ` (4 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:25 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move w100fb's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (57 preceding siblings ...)
  2009-01-12 22:25 ` [PATCH] move vga16fb's " Uwe Kleine-König
@ 2009-01-12 22:25 ` Uwe Kleine-König
  2009-01-12 22:25 ` [PATCH] move wm8400-regulator's " Uwe Kleine-König
                   ` (3 subsequent siblings)
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:25 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move wm8400-regulator's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (58 preceding siblings ...)
  2009-01-12 22:25 ` [PATCH] move w100fb's " Uwe Kleine-König
@ 2009-01-12 22:25 ` Uwe Kleine-König
  2009-01-13  9:57   ` Liam Girdwood
  2009-01-13 11:39   ` Mark Brown
  2009-01-12 22:25 ` [PATCH] move xilinx_spi's " Uwe Kleine-König
                   ` (2 subsequent siblings)
  62 siblings, 2 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:25 UTC (permalink / raw)
  To: linux-kernel

A pointer to wm8400_regulator_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>
---
 drivers/regulator/wm8400-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c
index 48b372e..56e23d4 100644
--- a/drivers/regulator/wm8400-regulator.c
+++ b/drivers/regulator/wm8400-regulator.c
@@ -289,7 +289,7 @@ static struct regulator_desc regulators[] = {
 	},
 };
 
-static int __init wm8400_regulator_probe(struct platform_device *pdev)
+static int __devinit wm8400_regulator_probe(struct platform_device *pdev)
 {
 	struct regulator_dev *rdev;
 
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move xilinx_spi's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (59 preceding siblings ...)
  2009-01-12 22:25 ` [PATCH] move wm8400-regulator's " Uwe Kleine-König
@ 2009-01-12 22:25 ` Uwe Kleine-König
  2009-01-12 22:25 ` [PATCH] move xtsonic's " Uwe Kleine-König
       [not found] ` <20090113031554.GA3671@linux-sh.org>
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:25 UTC (permalink / raw)
  To: linux-kernel

A pointer to xilinx_spi_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>
---
 drivers/spi/xilinx_spi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index 68d6f49..a5ca137 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -304,7 +304,7 @@ static irqreturn_t xilinx_spi_irq(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static int __init xilinx_spi_probe(struct platform_device *dev)
+static int __devinit xilinx_spi_probe(struct platform_device *dev)
 {
 	int ret = 0;
 	struct spi_master *master;
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move xtsonic's probe function to .devinit.text
  2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
                   ` (60 preceding siblings ...)
  2009-01-12 22:25 ` [PATCH] move xilinx_spi's " Uwe Kleine-König
@ 2009-01-12 22:25 ` Uwe Kleine-König
       [not found] ` <20090113031554.GA3671@linux-sh.org>
  62 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:25 UTC (permalink / raw)
  To: linux-kernel

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>
---
 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 03a3f34..5085aef 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.5.6.5


^ permalink raw reply related	[flat|nested] 75+ messages in thread

* Re: [PATCH] move corgi-keyboard's probe function to .devinit.text
  2009-01-12 22:24 ` [PATCH] move corgi-keyboard's " Uwe Kleine-König
@ 2009-01-13  6:20   ` Dmitry Torokhov
  0 siblings, 0 replies; 75+ messages in thread
From: Dmitry Torokhov @ 2009-01-13  6:20 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel

On Mon, Jan 12, 2009 at 11:24:16PM +0100, Uwe Kleine-König wrote:
> A pointer to corgikbd_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>

Applied, thank you Uwe.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH] move corgi-ts's probe function to .devinit.text
  2009-01-12 22:24 ` [PATCH] move corgi-ts's " Uwe Kleine-König
@ 2009-01-13  6:20   ` Dmitry Torokhov
  0 siblings, 0 replies; 75+ messages in thread
From: Dmitry Torokhov @ 2009-01-13  6:20 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel

On Mon, Jan 12, 2009 at 11:24:18PM +0100, Uwe Kleine-König wrote:
> A pointer to corgits_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>

Applied as well.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: platform_driver's probe functions must not be located in .init.text
       [not found] ` <20090113031554.GA3671@linux-sh.org>
@ 2009-01-13  6:42   ` Uwe Kleine-König
  0 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-13  6:42 UTC (permalink / raw)
  To: Paul Mundt, linux-kernel

On Tue, Jan 13, 2009 at 12:15:55PM +0900, Paul Mundt wrote:
> On Mon, Jan 12, 2009 at 11:12:02PM +0100, Uwe Kleine-K?nig wrote:
> > Hello,
> > 
> > if the probe function of a platform_driver lives in .init.text (i.e. is
> > defined using __init) registering a device after the .init sections are
> > discarded results in an oops.  You can test that by doing
> > 
> > 	echo $drivername.$somevalidid > /sys/bus/platform/drivers/$drivername/unbind
> > 	echo $drivername.$somevalidid > /sys/bus/platform/drivers/$drivername/bind
> > 
> > As a reply to this mail I send 62 patches that fix this kind of error by
> > moving the respective probe functions to .devinit.text.
> > 
> None of these patches balance with __devexit, is that intentional?
For now, yes, it is.  

One reason is that my script to find errors doesn't trigger for that.

Another is that this is not that critical.  If the probe function is in
.init.text you can get an oops.  If remove is in .text it just occupies
RAM without being used (if HOTPLUG=n).  And if remove is in .exit.text
and is properly wrapped in __exit_p when assigning .remove everything is
fine, too, you just cannot remove a device.

Maybe I will address this in later series.

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH] move wm8400-regulator's probe function to .devinit.text
  2009-01-12 22:25 ` [PATCH] move wm8400-regulator's " Uwe Kleine-König
@ 2009-01-13  9:57   ` Liam Girdwood
  2009-01-13 11:39   ` Mark Brown
  1 sibling, 0 replies; 75+ messages in thread
From: Liam Girdwood @ 2009-01-13  9:57 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel

On Mon, 2009-01-12 at 23:25 +0100, Uwe Kleine-König wrote:
> A pointer to wm8400_regulator_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>

Applied.

Thanks

Liam


^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH] move wm8400-regulator's probe function to .devinit.text
  2009-01-12 22:25 ` [PATCH] move wm8400-regulator's " Uwe Kleine-König
  2009-01-13  9:57   ` Liam Girdwood
@ 2009-01-13 11:39   ` Mark Brown
  1 sibling, 0 replies; 75+ messages in thread
From: Mark Brown @ 2009-01-13 11:39 UTC (permalink / raw)
  To: Uwe Kleine-K??nig; +Cc: linux-kernel

On Mon, Jan 12, 2009 at 11:25:05PM +0100, Uwe Kleine-K??nig wrote:
> A pointer to wm8400_regulator_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>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH] move omap-keypad's probe function to .devinit.text
  2009-01-12 22:24 ` [PATCH] move omap-keypad's " Uwe Kleine-König
@ 2009-01-14  5:34   ` Dmitry Torokhov
  0 siblings, 0 replies; 75+ messages in thread
From: Dmitry Torokhov @ 2009-01-14  5:34 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel

On Mon, Jan 12, 2009 at 11:24:40PM +0100, Uwe Kleine-König wrote:
> A pointer to omap_kp_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.
> 

Applied, thank you Uwe.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH] move spitz-keyboard's probe function to .devinit.text
  2009-01-12 22:24 ` [PATCH] move spitz-keyboard's " Uwe Kleine-König
@ 2009-01-14  5:34   ` Dmitry Torokhov
  0 siblings, 0 replies; 75+ messages in thread
From: Dmitry Torokhov @ 2009-01-14  5:34 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel

On Mon, Jan 12, 2009 at 11:24:58PM +0100, Uwe Kleine-König wrote:
> A pointer to spitzkbd_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.
> 

Applied as well, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH] move cfag12864bfb's probe function to .devinit.text
  2009-01-12 22:24 ` [PATCH] move cfag12864bfb's " Uwe Kleine-König
@ 2009-01-20  8:13   ` Miguel Ojeda
  2009-01-20  9:29     ` Uwe Kleine-König
  0 siblings, 1 reply; 75+ messages in thread
From: Miguel Ojeda @ 2009-01-20  8:13 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel

On Mon, Jan 12, 2009 at 11:24 PM, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> 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.

Thank you for the patch!

>
> 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.

Is that solution better? What are the pros/cons?

>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  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.5.6.5
>
> --
> 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/
>

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH] move cfag12864bfb's probe function to .devinit.text
  2009-01-20  8:13   ` Miguel Ojeda
@ 2009-01-20  9:29     ` Uwe Kleine-König
  0 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-01-20  9:29 UTC (permalink / raw)
  To: Miguel Ojeda; +Cc: linux-kernel

Hello Miguel,

On Tue, Jan 20, 2009 at 09:13:25AM +0100, Miguel Ojeda wrote:
> On Mon, Jan 12, 2009 at 11:24 PM, Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> 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.
> 
> Is that solution better? What are the pros/cons?
When using platform_driver_probe only devices that are already available
are probed.  There is no way you can bind a device that was registered
after the call to platform_driver_probe or that was once unbound via
sysfs.  In return your .probe function can live in .init.text and so you
can save some RAM.  (Note, that for modular drivers the situation is a
bit different because you can reload your modules (assuming it supports
unloading) and then you get a new platform_driver_probe call.  This
doesn't matter though, because either the devices are available before
you can load your module or your module creates the devices itself.)

I think for many drivers using platform_driver_probe is the more
sensible way, but it needs a deeper look and/or more testing.  With the
unfixed code a device that is created after platform_driver_register but
before the init sections are discarded is correctly bound.  After
changing to platform_driver_probe this is not the case anymore.  That's
why I choosed to stay with platform_driver_register for my patches.

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
Peiner Strasse 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686              | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [PATCH] move sgiseeq's probe function to .devinit.text
  2009-07-21 21:25 ` [PATCH] move sgiseeq's " Uwe Kleine-König
@ 2009-07-22  3:13   ` David Miller
  0 siblings, 0 replies; 75+ messages in thread
From: David Miller @ 2009-07-22  3:13 UTC (permalink / raw)
  To: u.kleine-koenig; +Cc: netdev, wangchen, akpm, jgarzik, tsbogend, gregkh


Applied.

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [PATCH] move sgiseeq's probe function to .devinit.text
  2009-07-21 21:25 [PATCH] move jazzsonic's " Uwe Kleine-König
@ 2009-07-21 21:25 ` Uwe Kleine-König
  2009-07-22  3:13   ` David Miller
  0 siblings, 1 reply; 75+ messages in thread
From: Uwe Kleine-König @ 2009-07-21 21:25 UTC (permalink / raw)
  To: netdev
  Cc: Wang Chen, David S. Miller, Andrew Morton, Jeff Garzik,
	Thomas Bogendoerfer, Greg Kroah-Hartman

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>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: netdev@vger.kernel.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 5fb88ca..53fa4f6 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -720,7 +720,7 @@ static const struct net_device_ops sgiseeq_netdev_ops = {
 	.ndo_validate_addr	= eth_validate_addr,
 };
 
-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;
-- 
tg: (aea1f79..) t/platsection/sgiseeq_driver (depends on: linus/master)

^ permalink raw reply related	[flat|nested] 75+ messages in thread

* [PATCH] move sgiseeq's probe function to .devinit.text
  2009-07-11 20:52                                                           ` [PATCH] move sb1250-mac's " Uwe Kleine-König
@ 2009-07-11 20:52                                                             ` Uwe Kleine-König
  0 siblings, 0 replies; 75+ messages in thread
From: Uwe Kleine-König @ 2009-07-11 20:52 UTC (permalink / raw)
  To: Greg KH, linux-kernel
  Cc: Wang Chen, David S. Miller, Andrew Morton, Jeff Garzik,
	Thomas Bogendoerfer

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>
Acked-by: 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 5fb88ca..53fa4f6 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -720,7 +720,7 @@ static const struct net_device_ops sgiseeq_netdev_ops = {
 	.ndo_validate_addr	= eth_validate_addr,
 };
 
-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.3.1


^ permalink raw reply related	[flat|nested] 75+ messages in thread

end of thread, other threads:[~2009-07-22  3:13 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-12 22:12 platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move acornfb's probe function to .devinit.text Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move am79c961's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move arcfb's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move at91_ether's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move at91_wdt's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move bf54x-lq043's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move bfin-t350mcqb's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move cfag12864bfb's " Uwe Kleine-König
2009-01-20  8:13   ` Miguel Ojeda
2009-01-20  9:29     ` Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move leds-clevo-mail's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move cobalt-lcd's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move corgi-keyboard's " Uwe Kleine-König
2009-01-13  6:20   ` Dmitry Torokhov
2009-01-12 22:24 ` [PATCH] move corgi-ssp's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move corgi-ts's " Uwe Kleine-König
2009-01-13  6:20   ` Dmitry Torokhov
2009-01-12 22:24 ` [PATCH] move efifb's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move orion-ehci's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move epson1355fb's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move sh_flctl's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move gbefb's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move h1940-bt's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move h1940-leds's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move hgafb's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move hitfb's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move hp680-bl's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move hp-wmi's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move jazzsonic's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move jornada_ssp's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move ks8695_wdt's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move macsonic's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move meth's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move mmci-omap's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move mailbox's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move omap24xxcam's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move mailbox's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move omap_hdq's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move omap-keypad's " Uwe Kleine-König
2009-01-14  5:34   ` Dmitry Torokhov
2009-01-12 22:24 ` [PATCH] move omap_rng's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move omap_wdt's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move orion_nand's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move gen_nand's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move q40fb's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move r8a66597_hcd's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move s3c241xfb's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move sa11x0-fb's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move flash's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move sb1250-mac's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move sgiseeq's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move sgivwfb's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move sgiwd93's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move sharpsl-pm's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move sh_mobile_lcdc_fb's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move snd_powermac's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move snirm_53c710's " Uwe Kleine-König
2009-01-12 22:24 ` [PATCH] move spitz-keyboard's " Uwe Kleine-König
2009-01-14  5:34   ` Dmitry Torokhov
2009-01-12 22:24 ` [PATCH] move stk17ta8's " Uwe Kleine-König
2009-01-12 22:25 ` [PATCH] move omap_udc's " Uwe Kleine-König
2009-01-12 22:25 ` [PATCH] move vesafb's " Uwe Kleine-König
2009-01-12 22:25 ` [PATCH] move vfb's " Uwe Kleine-König
2009-01-12 22:25 ` [PATCH] move vga16fb's " Uwe Kleine-König
2009-01-12 22:25 ` [PATCH] move w100fb's " Uwe Kleine-König
2009-01-12 22:25 ` [PATCH] move wm8400-regulator's " Uwe Kleine-König
2009-01-13  9:57   ` Liam Girdwood
2009-01-13 11:39   ` Mark Brown
2009-01-12 22:25 ` [PATCH] move xilinx_spi's " Uwe Kleine-König
2009-01-12 22:25 ` [PATCH] move xtsonic's " Uwe Kleine-König
     [not found] ` <20090113031554.GA3671@linux-sh.org>
2009-01-13  6:42   ` platform_driver's probe functions must not be located in .init.text Uwe Kleine-König
2009-07-11 17:05 [PATCH] platform_driver_register: warn if probe is " Greg KH
2009-07-11 20:52 ` [PATCH] move acornfb's probe function to .devinit.text Uwe Kleine-König
2009-07-11 20:52   ` [PATCH] move am79c961's " Uwe Kleine-König
2009-07-11 20:52     ` [PATCH] move arcfb's " Uwe Kleine-König
2009-07-11 20:52       ` [PATCH] move at91_ether's " Uwe Kleine-König
2009-07-11 20:52         ` [PATCH] move cfag12864bfb's " Uwe Kleine-König
2009-07-11 20:52           ` [PATCH] move leds-clevo-mail's " Uwe Kleine-König
2009-07-11 20:52             ` [PATCH] move cobalt-lcd's " Uwe Kleine-König
2009-07-11 20:52               ` [PATCH] move corgi-ssp's " Uwe Kleine-König
2009-07-11 20:52                 ` [PATCH] move efifb's " Uwe Kleine-König
2009-07-11 20:52                   ` [PATCH] move epson1355fb's " Uwe Kleine-König
2009-07-11 20:52                     ` [PATCH] move sh_flctl's " Uwe Kleine-König
2009-07-11 20:52                       ` [PATCH] move gbefb's " Uwe Kleine-König
2009-07-11 20:52                         ` [PATCH] move h1940-bt's " Uwe Kleine-König
2009-07-11 20:52                           ` [PATCH] move hgafb's " Uwe Kleine-König
2009-07-11 20:52                             ` [PATCH] move hitfb's " Uwe Kleine-König
2009-07-11 20:52                               ` [PATCH] move hp680-bl's " Uwe Kleine-König
2009-07-11 20:52                                 ` [PATCH] move hp-wmi's " Uwe Kleine-König
2009-07-11 20:52                                   ` [PATCH] move jazzsonic's " Uwe Kleine-König
2009-07-11 20:52                                     ` [PATCH] move jornada_ssp's " Uwe Kleine-König
2009-07-11 20:52                                       ` [PATCH] move macsonic's " Uwe Kleine-König
2009-07-11 20:52                                         ` [PATCH] move meth's " Uwe Kleine-König
2009-07-11 20:52                                           ` [PATCH] move omap24xxcam's " Uwe Kleine-König
2009-07-11 20:52                                             ` [PATCH] move omap_hdq's " Uwe Kleine-König
2009-07-11 20:52                                               ` [PATCH] move i2c_omap's " Uwe Kleine-König
2009-07-11 20:52                                                 ` [PATCH] move mmci-omap-hs's " Uwe Kleine-König
2009-07-11 20:52                                                   ` [PATCH] move orion_nand's " Uwe Kleine-König
2009-07-11 20:52                                                     ` [PATCH] move q40fb's " Uwe Kleine-König
2009-07-11 20:52                                                       ` [PATCH] move s3c241xfb's " Uwe Kleine-König
2009-07-11 20:52                                                         ` [PATCH] move sa11x0-fb's " Uwe Kleine-König
2009-07-11 20:52                                                           ` [PATCH] move sb1250-mac's " Uwe Kleine-König
2009-07-11 20:52                                                             ` [PATCH] move sgiseeq's " Uwe Kleine-König
2009-07-21 21:25 [PATCH] move jazzsonic's " Uwe Kleine-König
2009-07-21 21:25 ` [PATCH] move sgiseeq's " Uwe Kleine-König
2009-07-22  3:13   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.