Skip to contentSkip to conversation

platform_driver's probe functions must not be located in .init.text

RESENT Applied Uwe Kleine-König 17 participants 100 messages Mar 27, 2009 – Apr 28, 2009

Subsystems (34)
lore
Share & tools
lore
#0 lore raw

Hello,

[A very similar series was already posted in January this year, but only a few patches made it into Linus' tree. I updated my patches to Linus' current master and added a few new fixes. See

http://thread.gmane.org/gmane.linux.kernel/779532

for the old version. Now I made the effort to find out people to Cc:
for each patch, so I hope to get more patches in this time.]

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 58 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-3321-gbe0ea69.

Best regards
Uwe

Uwe Kleine-König (58):
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 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-ssp'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 i2c_omap's probe function to .devinit.text move mmci-omap-hs'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 stk17ta8's probe function to .devinit.text move twl4030_usb'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 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/i2c/busses/i2c-omap.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/mmc/host/omap_hsmmc.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/rtc/rtc-stk17ta8.c              |    2 +-
 drivers/scsi/sgiwd93.c                  |    2 +-
 drivers/scsi/sni_53c710.c               |    2 +-
 drivers/usb/gadget/omap_udc.c           |    2 +-
 drivers/usb/host/ehci-orion.c           |    2 +-
 drivers/usb/host/r8a66597-hcd.c         |    2 +-
 drivers/usb/otg/twl4030-usb.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/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 +-
 58 files changed, 61 insertions(+), 61 deletions(-)
Signature · 2 lines
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
#1 lore raw

PATCH 1/58 move acornfb's probe function to .devinit.text

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.

Cc Christoph Hellwig <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/video/acornfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/acornfb.c +1 -1
index 61c3d3f..19e4b21 100644
@@ -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;
Signature · 8 lines
1.6.2


------------------------------------------------------------------------------
_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
#2 lore raw

PATCH 2/58 move am79c961's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

---
 drivers/net/arm/am79c961a.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/arm/am79c961a.c +1 -1
index c2d012f..91d6a18 100644
@@ -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;
Signature · 1 line
1.6.2
#3 lore raw

PATCH 3/58 move arcfb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Antonino Daplas <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/video/arcfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/arcfb.c +1 -1
index c343169..01554d6 100644
@@ -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;
Signature · 1 line
1.6.2
#4 lore raw

PATCH 4/58 move at91_ether's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc David S. Miller <[email protected]>
Cc David Brownell <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc Paulius Zaleckas <[email protected]>
Cc Marc Pignat <[email protected]>
Cc Andrew Victor <[email protected]>
Cc Roel Kluin <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/net/arm/at91_ether.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/arm/at91_ether.c +1 -1
index 442938d..52e09eb 100644
@@ -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;
Signature · 1 line
1.6.2
#5 lore raw

Re: [PATCH 04/58] move at91_ether's probe function to .devinit.text

Quoted 3 lines · Uwe Kleine-König

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

IMO that's preferable for this driver. There's no point in doing anything other than discarding the probe() method after the driver has been set up; it'd be doing nothing except wasting memory.

Same thing for ... pretty much all other drivers for SoC platform devices.

In this series, you cc'd me on four OMAP drivers (mmci-omap, mmci-omap-hs, omap-rng, omap_udc) which I *know* that's a completely workable -- and far preferable -- solution. There might be others.

#6 lore raw

Re: [PATCH 04/58] move at91_ether's probe function to .devinit.text

Hi David,

Quoted 10 lines · David Brownell
Quoted 3 lines · Uwe Kleine-König

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

IMO that's preferable for this driver. There's no point in doing anything other than discarding the probe() method after the driver has been set up; it'd be doing nothing except wasting memory.

Quoted 7 lines

Same thing for ... pretty much all other drivers for SoC platform devices.

In this series, you cc'd me on four OMAP drivers (mmci-omap, mmci-omap-hs, omap-rng, omap_udc) which I *know* that's a completely workable -- and far preferable -- solution. There might be others.

So if I convert them to the alternative fix, you volunteer to test these patches? (Or at least provide your Tested-and-Acked-by:?)

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
#7 lore raw

Re: [PATCH 04/58] move at91_ether's probe function to .devinit.text

Quoted 8 lines · Uwe Kleine-König
Quoted 5 lines

In this series, you cc'd me on four OMAP drivers (mmci-omap, mmci-omap-hs, omap-rng, omap_udc) which I *know* that's a completely workable -- and far preferable -- solution.  There might be others.

So if I convert them to the alternative fix, you volunteer to test these patches?  (Or at least provide your Tested-and-Acked-by:?)

Sure, those four plus at91_ether. I've got that hardware sitting around, and it's just build-and-boot.

#8 lore raw

PATCH 1/1 make mmci-omap using platform_driver_probe

A pointer to mmc_omap_probe which lives in .init.text is passed to the core via platform_driver_register and so the kernel might oops if probe is called after the init code is discarded.

As requested by David Brownell platform_driver_probe is used instead of moving the probe function to .devinit.text. This saves some memory, but might have the downside that a device being registered after the call to mmc_omap_init but before the init sections are discarded will not be bound anymore to the driver.

Cc Grazvydas Ignotas <[email protected]>
Cc Pierre Ossman <[email protected]>
Cc David Brownell <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Jarkko Lavinen <[email protected]>
Cc Hiroshi DOYU <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Carlos Eduardo Aguiar <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/mmc/host/omap.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/mmc/host/omap.c +1 -2
index 67d7b7f..004080e 100644
@@ -1601,7 +1601,6 @@ static int mmc_omap_resume(struct platform_device *pdev)
 #endif
 
 static struct platform_driver mmc_omap_driver = {
-	.probe		= mmc_omap_probe,
 	.remove		= mmc_omap_remove,
 	.suspend	= mmc_omap_suspend,
 	.resume		= mmc_omap_resume,
@@ -1613,7 +1612,7 @@ static struct platform_driver mmc_omap_driver = {
 
 static int __init mmc_omap_init(void)
 {
-	return platform_driver_register(&mmc_omap_driver);
+	return platform_driver_probe(&mmc_omap_driver, mmc_omap_probe);
 }
 
 static void __exit mmc_omap_exit(void)
Signature · 1 line
tg: (5d80f8e..) t/platsection/mmc_omap_driver (depends on: linus/master)
#9 lore raw

Re: [PATCH] make mmci-omap using platform_driver_probe

Hello,

Ups, sorry, I got the In-Reply-To wrong. This should have been a reply to <1238196439-16535-27-git-send-email-u.kleine-koenig@pengutronix.de>.

Best regards
Uwe

Quoted 9 lines · Uwe Kleine-König

A pointer to mmc_omap_probe which lives in .init.text is passed to the core via platform_driver_register and so the kernel might oops if probe is called after the init code is discarded.

As requested by David Brownell platform_driver_probe is used instead of moving the probe function to .devinit.text. This saves some memory, but might have the downside that a device being registered after the call to mmc_omap_init but before the init sections are discarded will not be bound anymore to the driver.

Signature · 2 lines
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
Acked-by on v1 1/1
#10 lore raw

Re: [PATCH] make mmci-omap using platform_driver_probe

In reply to Uwe Kleine-König
Quoted 9 lines · Uwe Kleine-König

A pointer to mmc_omap_probe which lives in .init.text is passed to the core via platform_driver_register and so the kernel might oops if probe is called after the init code is discarded.

As requested by David Brownell platform_driver_probe is used instead of moving the probe function to .devinit.text. This saves some memory, but might have the downside that a device being registered after the call to mmc_omap_init but before the init sections are discarded will not be bound anymore to the driver.

One of the reasons I said to do it that way is that we *KNOW* it is safe for thiis driver. That's a non-issue; no downside.

Quoted 5 lines
Cc Grazvydas Ignotas <[email protected]>
Cc Pierre Ossman <[email protected]>
Cc David Brownell <[email protected]>
Quoted 38 lines
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Jarkko Lavinen <[email protected]>
Cc Hiroshi DOYU <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Carlos Eduardo Aguiar <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/mmc/host/omap.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/mmc/host/omap.c +1 -2
index 67d7b7f..004080e 100644
@@ -1601,7 +1601,6 @@ static int mmc_omap_resume(struct platform_device *pdev)
 #endif
 
 static struct platform_driver mmc_omap_driver = {
-	.probe		= mmc_omap_probe,
 	.remove		= mmc_omap_remove,
 	.suspend	= mmc_omap_suspend,
 	.resume		= mmc_omap_resume,
@@ -1613,7 +1612,7 @@ static struct platform_driver mmc_omap_driver = {
 
 static int __init mmc_omap_init(void)
 {
-	return platform_driver_register(&mmc_omap_driver);
+	return platform_driver_probe(&mmc_omap_driver, mmc_omap_probe);
 }
 
 static void __exit mmc_omap_exit(void)
Signature · 1 line
tg: (5d80f8e..) t/platsection/mmc_omap_driver (depends on: linus/master)
#11 lore raw

Re: [PATCH] make mmci-omap using platform_driver_probe

In reply to Uwe Kleine-König
Quoted 23 lines · On Thu, 2 Apr 2009 19:47:41 +0200 Uwe Kleine-König…

A pointer to mmc_omap_probe which lives in .init.text is passed to the core via platform_driver_register and so the kernel might oops if probe is called after the init code is discarded.

As requested by David Brownell platform_driver_probe is used instead of moving the probe function to .devinit.text. This saves some memory, but might have the downside that a device being registered after the call to mmc_omap_init but before the init sections are discarded will not be bound anymore to the driver.

Cc Grazvydas Ignotas <[email protected]>
Cc Pierre Ossman <[email protected]>
Cc David Brownell <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Jarkko Lavinen <[email protected]>
Cc Hiroshi DOYU <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Carlos Eduardo Aguiar <[email protected]>
Cc Andrew Morton <[email protected]>
Quoted 1 line

---

Queued.

Rgds

Signature · 10 lines
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  rdesktop, core developer          http://www.rdesktop.org
  TigerVNC, core developer          http://www.tigervnc.org

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.
#12 lore raw

Re: [PATCH] make mmci-omap using platform_driver_probe

Quoted 6 lines · Pierre Ossman
Quoted 6 lines

As requested by David Brownell platform_driver_probe is used instead of moving the probe function to .devinit.text.  This saves some memory, but might have the downside that a device being registered after the call to mmc_omap_init but before the init sections are discarded will not be bound anymore to the driver.

However, as I noted that *does not happen* ... so, no worries.

#13 lore raw

PATCH 5/58 move at91_wdt's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Andrew Victor <[email protected]>
Cc Russell King <[email protected]>
Cc Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Cc Ilpo Jarvinen <[email protected]>
Cc Wim Van Sebroeck <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/watchdog/at91rm9200_wdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/at91rm9200_wdt.c +1 -1
index e35d545..ee82323 100644
@@ -197,7 +197,7 @@ static struct miscdevice at91wdt_miscdev = {
 	.fops		= &at91wdt_fops,
 };
 
-static int __init at91wdt_probe(struct platform_device *pdev)
+static int __devinit at91wdt_probe(struct platform_device *pdev)
 {
 	int res;
 
Signature · 1 line
1.6.2
#14 lore raw

PATCH 6/58 move bf54x-lq043's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Bryan Wu <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Michael Hennerich <[email protected]>
Cc Mike Frysinger <[email protected]>
Cc Krzysztof Helt <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Antonino Daplas <[email protected]>
---
 drivers/video/bf54x-lq043fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/bf54x-lq043fb.c +1 -1
index 37e60b1..0a848c0 100644
@@ -530,7 +530,7 @@ static irqreturn_t bfin_bf54x_irq_error(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static int __init bfin_bf54x_probe(struct platform_device *pdev)
+static int __devinit bfin_bf54x_probe(struct platform_device *pdev)
 {
 	struct bfin_bf54xfb_info *info;
 	struct fb_info *fbinfo;
Signature · 1 line
1.6.2
#15 lore raw

PATCH 7/58 move cfag12864bfb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Miguel Ojeda <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Avuton Olrich <[email protected]>
Cc Antonino Daplas <[email protected]>
---
 drivers/auxdisplay/cfag12864bfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/auxdisplay/cfag12864bfb.c +1 -1
index fe3a865..b0ca5a4 100644
@@ -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);
Signature · 1 line
1.6.2
#16 lore raw

Re: [PATCH 07/58] move cfag12864bfb's probe function to .devinit.text

2009/3/27 Uwe Kleine-König <[email protected]>:

Quoted 10 lines

A pointer to cfag12864bfb_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded.  Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

ACK, thank you!

Quoted 26 lines
Cc Miguel Ojeda <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Avuton Olrich <[email protected]>
Cc Antonino Daplas <[email protected]>

---
 drivers/auxdisplay/cfag12864bfb.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/auxdisplay/cfag12864bfb.c +1 -2
index fe3a865..b0ca5a4 100644
@@ -81,7 +81,7 @@ static struct fb_ops cfag12864bfb_ops = {
        .fb_mmap = cfag12864bfb_mmap,
  };
 
-static int __init cfag12864bfb_probe(struct platform_device *device)
+static int __devinit cfag12864bfb_probe(struct platform_device *device)
  {
        int ret = -EINVAL;
        struct fb_info *info = framebuffer_alloc(0, &device->dev);
--

1.6.2

#17 lore raw

PATCH 8/58 move leds-clevo-mail's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Richard Purdie <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Márton Németh <[email protected]>
---
 drivers/leds/leds-clevo-mail.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/leds/leds-clevo-mail.c +1 -1
index 1813c84..8ee83ce 100644
@@ -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);
 }
Signature · 1 line
1.6.2
#18 lore raw

PATCH 9/58 move cobalt-lcd's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Yoichi Yuasa <[email protected]>
Cc Krzysztof Helt <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Ralf Baechle <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/video/cobalt_lcdfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/cobalt_lcdfb.c +1 -1
index 7bad24e..5ef3a0f 100644
@@ -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;
Signature · 1 line
1.6.2
Acked-by on v1 9/58
#19 lore raw

Re: [PATCH 09/58] move cobalt-lcd's probe function to .devinit.text

Quoted 10 lines · Uwe Kleine-König

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.

Quoted 6 lines
Cc Yoichi Yuasa <[email protected]>
Cc Krzysztof Helt <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Ralf Baechle <[email protected]>
Cc Andrew Morton <[email protected]>

Ralf

#20 lore raw

PATCH 10/58 move corgi-ssp's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Eric Miao <[email protected]>
Cc Russell King <[email protected]>
Cc Paul Sokolovsky <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Andrew Morton <[email protected]>
---
 arch/arm/mach-pxa/corgi_ssp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-pxa/corgi_ssp.c +1 -1
index 8e2f221..0565960 100644
@@ -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;
 
Signature · 1 line
1.6.2
#21 lore raw

Re: [PATCH 10/58] move corgi-ssp's probe function to .devinit.text

2009/3/28 Uwe Kleine-König <[email protected]>:

Quoted 10 lines

A pointer to corgi_ssp_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded.  Otherwise (when having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

These files are supposed to be deprecated and I'm planning to remove them once drivers/input/touchscreen/corgi-ts.c begins its migration to ads7846.c (with a posted fix currently queued in the -mm tree). Other than corgi-ts.c, there will be no reference to them.

#22 lore raw

PATCH 11/58 move efifb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Peter Jones <[email protected]>
Cc Krzysztof Helt <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Jaya Kumar <[email protected]>
Cc Ralf Baechle <[email protected]>
Cc Maciej W. Rozycki <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Chandramouli Narayanan <[email protected]>
Cc Huang Ying <[email protected]>
---
 drivers/video/efifb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/efifb.c +1 -1
index daf9b81..94b2e4c 100644
@@ -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;
Signature · 1 line
1.6.2
#23 lore raw

PATCH 12/58 move orion-ehci's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Ronen Shitrit <[email protected]>
Cc Lennert Buytenhek <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Alan Stern <[email protected]>
Cc David Brownell <[email protected]>
Cc Nicolas Pitre <[email protected]>
Cc Russell King <[email protected]>
Cc Tzachi Perelstein <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/usb/host/ehci-orion.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/ehci-orion.c +1 -1
index 9d48790..17dc154 100644
@@ -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;
Signature · 1 line
1.6.2
#24 lore raw

PATCH 13/58 move epson1355fb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Russell King <[email protected]>
Cc Krzysztof Helt <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Paul Mundt <[email protected]>
Cc Roland Stigge <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/video/epson1355fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/epson1355fb.c +1 -1
index 2735b79..6d755bb 100644
@@ -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;
Signature · 1 line
1.6.2
#25 lore raw

PATCH 14/58 move sh_flctl's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Yoshihiro Shimoda <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Paul Mundt <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/mtd/nand/sh_flctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/sh_flctl.c +1 -1
index 821acb0..fdc0e4e 100644
@@ -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;
Signature · 1 line
1.6.2
Acked-by on v1 14/58
#26 lore raw

Re: [PATCH 14/58] move sh_flctl's probe function to .devinit.text

Thanks,
Yoshihiro Shimoda

Quoted 32 lines · Uwe Kleine-König

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.

Cc Yoshihiro Shimoda <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Paul Mundt <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/mtd/nand/sh_flctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/sh_flctl.c +1 -1
index 821acb0..fdc0e4e 100644
@@ -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;
#27 lore raw

PATCH 15/58 move gbefb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Roel Kluin <[email protected]>
Cc Krzysztof Helt <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Kaj-Michael Lang <[email protected]>
Cc Martin Michlmayr <[email protected]>
Cc Joshua Kinard <[email protected]>
---
 drivers/video/gbefb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/gbefb.c +1 -1
index fe5b519..4c7f3a0 100644
@@ -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;
Signature · 1 line
1.6.2
#28 lore raw

PATCH 16/58 move h1940-bt's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Russell King <[email protected]>
Cc Arnaud Patard <[email protected]>
Cc Ben Dooks <[email protected]>
Cc Andrew Morton <[email protected]>
---
 arch/arm/mach-s3c2410/h1940-bluetooth.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-s3c2410/h1940-bluetooth.c +1 -1
index 5a6bc56..6810f9c 100644
@@ -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);
Signature · 1 line
1.6.2
#29 lore raw

PATCH 17/58 move h1940-leds's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Russell King <[email protected]>
Cc Ben Dooks <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Márton Németh <[email protected]>
Cc Arnaud Patard <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/leds/leds-h1940.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/leds/leds-h1940.c +1 -1
index 11b77a7..1aa46a3 100644
@@ -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;
 
Signature · 1 line
1.6.2
#30 lore raw

PATCH 18/58 move hgafb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Krzysztof Helt <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Anton Vorontsov <[email protected]>
Cc Antonino Daplas <[email protected]>
---
 drivers/video/hgafb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/hgafb.c +1 -1
index 0129c04..db9b785 100644
@@ -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;
 
Signature · 1 line
1.6.2
#31 lore raw

PATCH 19/58 move hitfb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Paul Mundt <[email protected]>
Cc Andriy Skulysh <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/video/hitfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/hitfb.c +1 -1
index e6467cf..be3d89a 100644
@@ -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;
 
Signature · 1 line
1.6.2
#32 lore raw

PATCH 20/58 move hp680-bl's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Akinobu Mita <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Paul Mundt <[email protected]>
Cc Kristoffer Ericson <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Andriy Skulysh <[email protected]>
Cc Antonino Daplas <[email protected]>
---
 drivers/video/backlight/hp680_bl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/backlight/hp680_bl.c +1 -1
index 5be55a2..7fb4eef 100644
@@ -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;
 
Signature · 1 line
1.6.2
Acked-by on v1 20/58
#33 lore raw

Re: [PATCH 20/58] move hp680-bl's probe function to .devinit.text

Quoted 38 lines · On Sat, 28 Mar 2009 00:26:41 +0100 Uwe Kleine-König…

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.

Cc Akinobu Mita <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Paul Mundt <[email protected]>
Cc Kristoffer Ericson <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Andriy Skulysh <[email protected]>
Cc Antonino Daplas <[email protected]>
---
 drivers/video/backlight/hp680_bl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/backlight/hp680_bl.c +1 -1
index 5be55a2..7fb4eef 100644
@@ -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;
 
Signature · 1 line
1.6.2
Signature · 1 line
Kristoffer Ericson <[email protected]>
#34 lore raw

PATCH 21/58 move hp-wmi's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Frans Pop <[email protected]>
Cc Larry Finger <[email protected]>
Cc Len Brown <[email protected]>
Cc Helge Deller <[email protected]>
Cc Matthew Garrett <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/platform/x86/hp-wmi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/hp-wmi.c +2 -2
index f41135f..7b31da7 100644
@@ -51,7 +51,7 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4");
 #define HPWMI_WIRELESS_QUERY 0x5
 #define HPWMI_HOTKEY_QUERY 0xc
 
-static int __init hp_wmi_bios_setup(struct platform_device *device);
+static int __devinit hp_wmi_bios_setup(struct platform_device *device);
 static int __exit hp_wmi_bios_remove(struct platform_device *device);
 
 struct bios_args {
@@ -409,7 +409,7 @@ static void cleanup_sysfs(struct platform_device *device)
 	device_remove_file(&device->dev, &dev_attr_dock);
 }
 
-static int __init hp_wmi_bios_setup(struct platform_device *device)
+static int __devinit hp_wmi_bios_setup(struct platform_device *device)
 {
 	int err;
 	int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0);
Signature · 1 line
1.6.2
#35 lore raw

PATCH 22/58 move jazzsonic's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Ralf Baechle <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc David S. Miller <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Finn Thain <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/net/jazzsonic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/jazzsonic.c +1 -1
index 14248cf..3695f2d 100644
@@ -204,7 +204,7 @@ out:
  * Probe for a SONIC ethernet controller on a Mips Jazz board.
  * Actually probing is superfluous but we're paranoid.
  */
-static int __init jazz_sonic_probe(struct platform_device *pdev)
+static int __devinit jazz_sonic_probe(struct platform_device *pdev)
 {
 	struct net_device *dev;
 	struct sonic_local *lp;
Signature · 1 line
1.6.2
#36 lore raw

Re: [PATCH 22/58] move jazzsonic's probe function to .devinit.text

2009/3/28 Uwe Kleine-König <[email protected]>:

Quoted 27 lines

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.

Cc Ralf Baechle <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc David S. Miller <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Finn Thain <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Andrew Morton <[email protected]>

---
 drivers/net/jazzsonic.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/jazzsonic.c +0 -0
index 14248cf..3695f2d 100644

drivers/net/jazzsonic.c out: · line 210

Quoted 8 lines
drivers/net/jazzsonic.c +1 -1
@@ -204,7 +204,7 @@ out:
  * Probe for a SONIC ethernet controller on a Mips Jazz board.
  * Actually probing is superfluous but we're paranoid.
  */
-static int __init jazz_sonic_probe(struct platform_device *pdev)
+static int __devinit jazz_sonic_probe(struct platform_device *pdev)
  {
        struct net_device *dev;
        struct sonic_local *lp;

Same problem in sonic_probe1() (called from sonic_probe())

-Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

Acked-by on v1 22/58
#37 lore raw

Re: [PATCH 22/58] move jazzsonic's probe function to .devinit.text

In reply to Uwe Kleine-König
Quoted 10 lines · Uwe Kleine-König

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.

Quoted 8 lines
Cc Ralf Baechle <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc David S. Miller <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Finn Thain <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Andrew Morton <[email protected]>

Ralf

#38 lore raw

PATCH 1/1 move jazzsonic's probe function to .devinit.text

In reply to Uwe Kleine-König

A pointer to jazz_sonic_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

As noticed by Geert Uytterhoeven sonic_probe1 is called by jazz_sonic_probe, so the former has to move to .devinit.text, too.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

Cc Ralf Baechle <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc David S. Miller <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Finn Thain <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Andrew Morton <[email protected]>

---
Hi Geert and Ralf,

thanks for your feed-back.

@Geert: Did you notice this, or your compiler?
@Ralf: I assume that I can still add your ack after this additional change?

Best regards
Uwe

 drivers/net/jazzsonic.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/jazzsonic.c +2 -2
index 14248cf..ca68383 100644
@@ -96,7 +96,7 @@ static int jazzsonic_close(struct net_device* dev)
 	return err;
 }
 
-static int __init sonic_probe1(struct net_device *dev)
+static int __devinit sonic_probe1(struct net_device *dev)
 {
 	static unsigned version_printed;
 	unsigned int silicon_revision;
@@ -204,7 +204,7 @@ out:
  * Probe for a SONIC ethernet controller on a Mips Jazz board.
  * Actually probing is superfluous but we're paranoid.
  */
-static int __init jazz_sonic_probe(struct platform_device *pdev)
+static int __devinit jazz_sonic_probe(struct platform_device *pdev)
 {
 	struct net_device *dev;
 	struct sonic_local *lp;
Signature · 1 line
tg: (be0ea69..) t/platsection/jazz_sonic_driver (depends on: linus/master)
#39 lore raw

Re: [PATCH] move jazzsonic's probe function to .devinit.text

2009/3/28 Uwe Kleine-König <[email protected]>:

Quoted 21 lines

A pointer to jazz_sonic_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded.  Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

As noticed by Geert Uytterhoeven sonic_probe1 is called by jazz_sonic_probe, so the former has to move to .devinit.text, too.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

Cc Ralf Baechle <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc David S. Miller <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Finn Thain <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Andrew Morton <[email protected]>
Quoted 6 lines

---
Hi Geert and Ralf,

thanks for your feed-back.

@Geert: Did you notice this, or your compiler?

I noticed this in macsonic, when I reviewed your patch.
As jazzsonic is very similar to macsonic, I suspected your patch had the same issue there ;-)

Probably the compiler didn't tell you, because it inlined the other functions. Still wondering why my compiler didn't tell me before. Maybe I just forgot to build for Mac with CONFIG_DEBUG_SECTION_MISMATCH=y...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#40 lore raw

PATCH 23/58 move jornada_ssp's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Kristoffer Ericson <[email protected]>
Cc Russell King <[email protected]>
Cc Andrew Morton <[email protected]>
---
 arch/arm/mach-sa1100/jornada720_ssp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-sa1100/jornada720_ssp.c +1 -1
index 28cf369..ce4c6cb 100644
@@ -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;
 
Signature · 1 line
1.6.2
Acked-by on v1 23/58
#41 lore raw

Re: [PATCH 23/58] move jornada_ssp's probe function to .devinit.text

Thx

Quoted 34 lines · On Sat, 28 Mar 2009 00:26:44 +0100 Uwe Kleine-König…

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.

Cc Kristoffer Ericson <[email protected]>
Cc Russell King <[email protected]>
Cc Andrew Morton <[email protected]>
---
 arch/arm/mach-sa1100/jornada720_ssp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-sa1100/jornada720_ssp.c +1 -1
index 28cf369..ce4c6cb 100644
@@ -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;
 
Signature · 1 line
1.6.2
Signature · 1 line
Kristoffer Ericson <[email protected]>
#42 lore raw

PATCH 24/58 move ks8695_wdt's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Alexey Dobriyan <[email protected]>
Cc Wim Van Sebroeck <[email protected]>
Cc Alan Cox <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/watchdog/ks8695_wdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/ks8695_wdt.c +1 -1
index 74c92d3..cdbb36a 100644
@@ -221,7 +221,7 @@ static struct miscdevice ks8695wdt_miscdev = {
 	.fops		= &ks8695wdt_fops,
 };
 
-static int __init ks8695wdt_probe(struct platform_device *pdev)
+static int __devinit ks8695wdt_probe(struct platform_device *pdev)
 {
 	int res;
 
Signature · 1 line
1.6.2
#43 lore raw

PATCH 25/58 move macsonic's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Jeff Garzik <[email protected]>
Cc David S. Miller <[email protected]>
Cc Finn Thain <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/net/macsonic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/macsonic.c +1 -1
index 527166e..d4f913b 100644
@@ -555,7 +555,7 @@ static int __init mac_nubus_sonic_probe(struct net_device *dev)
 	return macsonic_init(dev);
 }
 
-static int __init mac_sonic_probe(struct platform_device *pdev)
+static int __devinit mac_sonic_probe(struct platform_device *pdev)
 {
 	struct net_device *dev;
 	struct sonic_local *lp;
Signature · 1 line
1.6.2
#44 lore raw

Re: [PATCH 25/58] move macsonic's probe function to .devinit.text

2009/3/28 Uwe Kleine-König <[email protected]>:

Quoted 25 lines

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.

Cc Jeff Garzik <[email protected]>
Cc David S. Miller <[email protected]>
Cc Finn Thain <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Andrew Morton <[email protected]>

---
 drivers/net/macsonic.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/macsonic.c +0 -0
index 527166e..d4f913b 100644

drivers/net/macsonic.c static int __init mac_nubus_sonic_probe(struct net_device *dev) · line 561

Quoted 8 lines
drivers/net/macsonic.c +1 -1
@@ -555,7 +555,7 @@ static int __init mac_nubus_sonic_probe(struct net_device *dev)
        return macsonic_init(dev);
  }
 
-static int __init mac_sonic_probe(struct platform_device *pdev)
+static int __devinit mac_sonic_probe(struct platform_device *pdev)
  {
        struct net_device *dev;
        struct sonic_local *lp;

mac_{onboard,nubus}_sonic_probe() (called by mac_sonic_probe()) have the same problem.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#45 lore raw

PATCH 1/1 move macsonic's probe function to .devinit.text

In reply to Uwe Kleine-König

A pointer to mac_sonic_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

Various other functions that are called by mac_sonic_probe need to move to .devinit.text, too.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

Cc Jeff Garzik <[email protected]>
Cc David S. Miller <[email protected]>
Cc Finn Thain <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/net/macsonic.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
drivers/net/macsonic.c +7 -7
index 527166e..e4f177e 100644
@@ -167,7 +167,7 @@ static int macsonic_close(struct net_device* dev)
 	return err;
 }
 
-static int __init macsonic_init(struct net_device *dev)
+static int __devinit macsonic_init(struct net_device *dev)
 {
 	struct sonic_local* lp = netdev_priv(dev);
 
@@ -216,7 +216,7 @@ static int __init macsonic_init(struct net_device *dev)
 	return 0;
 }
 
-static int __init mac_onboard_sonic_ethernet_addr(struct net_device *dev)
+static int __devinit mac_onboard_sonic_ethernet_addr(struct net_device *dev)
 {
 	struct sonic_local *lp = netdev_priv(dev);
 	const int prom_addr = ONBOARD_SONIC_PROM_BASE;
@@ -281,7 +281,7 @@ static int __init mac_onboard_sonic_ethernet_addr(struct net_device *dev)
 	} else return 0;
 }
 
-static int __init mac_onboard_sonic_probe(struct net_device *dev)
+static int __devinit mac_onboard_sonic_probe(struct net_device *dev)
 {
 	/* Bwahahaha */
 	static int once_is_more_than_enough;
@@ -402,7 +402,7 @@ static int __init mac_onboard_sonic_probe(struct net_device *dev)
 	return macsonic_init(dev);
 }
 
-static int __init mac_nubus_sonic_ethernet_addr(struct net_device *dev,
+static int __devinit mac_nubus_sonic_ethernet_addr(struct net_device *dev,
 						unsigned long prom_addr,
 						int id)
 {
@@ -417,7 +417,7 @@ static int __init mac_nubus_sonic_ethernet_addr(struct net_device *dev,
 	return 0;
 }
 
-static int __init macsonic_ident(struct nubus_dev *ndev)
+static int __devinit macsonic_ident(struct nubus_dev *ndev)
 {
 	if (ndev->dr_hw == NUBUS_DRHW_ASANTE_LC &&
 	    ndev->dr_sw == NUBUS_DRSW_SONIC_LC)
@@ -442,7 +442,7 @@ static int __init macsonic_ident(struct nubus_dev *ndev)
 	return -1;
 }
 
-static int __init mac_nubus_sonic_probe(struct net_device *dev)
+static int __devinit mac_nubus_sonic_probe(struct net_device *dev)
 {
 	static int slots;
 	struct nubus_dev* ndev = NULL;
@@ -555,7 +555,7 @@ static int __init mac_nubus_sonic_probe(struct net_device *dev)
 	return macsonic_init(dev);
 }
 
-static int __init mac_sonic_probe(struct platform_device *pdev)
+static int __devinit mac_sonic_probe(struct platform_device *pdev)
 {
 	struct net_device *dev;
 	struct sonic_local *lp;
Signature · 1 line
tg: (be0ea69..) t/platsection/mac_sonic_driver (depends on: linus/master)
#46 lore raw

PATCH 26/58 move meth's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc David S. Miller <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc Ralf Baechle <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/net/meth.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/meth.c +1 -1
index c336a1f..8947129 100644
@@ -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;
Signature · 1 line
1.6.2
Acked-by on v1 26/58
#47 lore raw

Re: [PATCH 26/58] move meth's probe function to .devinit.text

Quoted 10 lines · Uwe Kleine-König

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.

Quoted 7 lines
Cc David S. Miller <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc Ralf Baechle <[email protected]>
Cc Andrew Morton <[email protected]>

Ralf

#48 lore raw

PATCH 27/58 move mmci-omap's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Grazvydas Ignotas <[email protected]>
Cc Pierre Ossman <[email protected]>
Cc David Brownell <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Jarkko Lavinen <[email protected]>
Cc Hiroshi DOYU <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Carlos Eduardo Aguiar <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/mmc/host/omap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/omap.c +1 -1
index 67d7b7f..33bf49f 100644
@@ -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;
Signature · 1 line
1.6.2
#49 lore raw

PATCH 28/58 move mailbox's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Russell King <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Hiroshi DOYU <[email protected]>
Cc Juha Yrjola <[email protected]>
Cc Andrew Morton <[email protected]>
---
 arch/arm/mach-omap1/mailbox.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap1/mailbox.c +1 -1
index 59abbf3..e91211c 100644
@@ -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;
Signature · 1 line
1.6.2
#50 lore raw

PATCH 29/58 move omap24xxcam's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Sakari Ailus <[email protected]>
Cc Trilok Soni <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/media/video/omap24xxcam.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/omap24xxcam.c +1 -1
index 73eb656..270e60d 100644
@@ -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;
Signature · 1 line
1.6.2
#51 lore raw

Re: [PATCH 29/58] move omap24xxcam's probe function to .devinit.text

Quoted 16 lines · ext Uwe Kleine-König

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.

Cc Sakari Ailus <[email protected]>
Cc Trilok Soni <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Andrew Morton <[email protected]>
Quoted 3 lines
---
 drivers/media/video/omap24xxcam.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Signature · 2 lines
Sakari Ailus
[email protected]
#52 lore raw

Re: [PATCH 29/58] move omap24xxcam's probe function to .devinit.text

Hallo Sakari,

Quoted 21 lines · Sakari Ailus
Quoted 16 lines · ext Uwe Kleine-König

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.

Cc Sakari Ailus <[email protected]>
Cc Trilok Soni <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Andrew Morton <[email protected]>
Quoted 3 lines
---
 drivers/media/video/omap24xxcam.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 1 line

Does your S-o-b means you care for inclusion in mainline?[1] Or should I record that as an Acked-by?

Best regards
Uwe

[1] Quoting Documentation/SubmittingPatches:
"The Signed-off-by: tag indicates that the signer was involved in the development of the patch, or that he/she was in the patch's delivery path.

If a person was not directly involved in the preparation or handling of a patch but wishes to signify and record their approval of it then they can arrange to have an Acked-by: line added to the patch's changelog."

Signature · 2 lines
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
#53 lore raw

Re: [PATCH 29/58] move omap24xxcam's probe function to .devinit.text

Quoted 23 lines · Uwe Kleine-König

Hallo Sakari,

Quoted 20 lines · Sakari Ailus
Quoted 19 lines · ext Uwe Kleine-König

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.

Cc Sakari Ailus <[email protected]>
Cc Trilok Soni <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/media/video/omap24xxcam.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 3 lines
Quoted 1 line

Does your S-o-b means you care for inclusion in mainline?[1] Or should I record that as an Acked-by?

Sorry. Take that as Acked-by.

Signature · 2 lines
Sakari Ailus
[email protected]
Acked-by on v1 29/58
#54 lore raw

Re: [PATCH 29/58] move omap24xxcam's probe function to .devinit.text

In reply to Uwe Kleine-König

Hi Uwe,

Quoted 10 lines
drivers/media/video/omap24xxcam.c +1 -1
-static int __init omap24xxcam_probe(struct platform_device *pdev)
+static int __devinit omap24xxcam_probe(struct platform_device *pdev)

 {
       struct omap24xxcam_device *cam;
       struct resource *mem;
--
1.6.2

Signature · 3 lines
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
#55 lore raw

PATCH 30/58 move mailbox's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Hiroshi DOYU <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Juha Yrjola <[email protected]>
Cc Russell King <[email protected]>
Cc Andrew Morton <[email protected]>
---
 arch/arm/mach-omap2/mailbox.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/mailbox.c +1 -1
index 32b7af3..726876c 100644
@@ -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;
Signature · 1 line
1.6.2
#56 lore raw

PATCH 31/58 move omap_hdq's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Stanley.Miao <[email protected]>
Cc Evgeniy Polyakov <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Madhusudhan Chikkature <[email protected]>
Cc Felipe Balbi <[email protected]>
---
 drivers/w1/masters/omap_hdq.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/w1/masters/omap_hdq.c +2 -2
index c973889..6a5dd2e 100644
@@ -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;
Signature · 1 line
1.6.2
#57 lore raw

Re: [PATCH 31/58] move omap_hdq's probe function to .devinit.text

Hi Uwe.

Quoted 9 lines · Uwe Kleine-König

A pointer to omap_hdq_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

I wonder if it can be hotplugged, but for the consistency it looks good.

Signature · 1 line
	Evgeniy Polyakov
#58 lore raw

Re: [PATCH 31/58] move omap_hdq's probe function to .devinit.text

Hi Evgeniy,

Quoted 7 lines · Evgeniy Polyakov
Quoted 6 lines · Uwe Kleine-König

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.

Quoted 5 lines
Quoted 3 lines

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

I wonder if it can be hotplugged, but for the consistency it looks good.

Maybe you cannot really hotplug it, but with CONFIG_HOTPLUG you can unbind it via sysfs and rebind it afterwards, too.

Can I consider this an Acked-by: you?

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
#59 lore raw

Re: [PATCH 31/58] move omap_hdq's probe function to .devinit.text

Hi Uwe.

Quoted 4 lines · Uwe Kleine-König

Maybe you cannot really hotplug it, but with CONFIG_HOTPLUG you can unbind it via sysfs and rebind it afterwards, too.

Can I consider this an Acked-by: you?

Yes, sure.
Thank you.

Signature · 1 line
	Evgeniy Polyakov
#60 lore raw

PATCH 32/58 move i2c_omap's probe function to .devinit.text

In reply to Uwe Kleine-König

A pointer to omap_i2c_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

Cc Kalle Jokiniemi <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Richard Woodruff <[email protected]>
Cc chandra shekhar <[email protected]>
Cc Jason P Marini <[email protected]>
Cc Syed Mohammed Khasim <[email protected]>
Cc Jarkko Nikula <[email protected]>
Cc Juha Yrjola <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/i2c/busses/i2c-omap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-omap.c +1 -1
index be8ee2c..f803108 100644
@@ -766,7 +766,7 @@ static const struct i2c_algorithm omap_i2c_algo = {
 	.functionality	= omap_i2c_func,
 };
 
-static int __init
+static int __devinit
 omap_i2c_probe(struct platform_device *pdev)
 {
 	struct omap_i2c_dev	*dev;
Signature · 1 line
1.6.2
#61 lore raw

PATCH 33/58 move mmci-omap-hs's probe function to .devinit.text

In reply to Uwe Kleine-König

A pointer to omap_mmc_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

Cc Jean Pihet <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Pierre Ossman <[email protected]>
Cc Andy Lowe <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Andrew Morton <[email protected]>
Cc David Brownell <[email protected]>
Cc Madhusudhan Chikkature<[email protected]>
---
 drivers/mmc/host/omap_hsmmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/omap_hsmmc.c +1 -1
index a631c81..e2085a8 100644
@@ -899,7 +899,7 @@ static struct mmc_host_ops mmc_omap_ops = {
 	/* NYET -- enable_sdio_irq */
 };
 
-static int __init omap_mmc_probe(struct platform_device *pdev)
+static int __devinit omap_mmc_probe(struct platform_device *pdev)
 {
 	struct omap_mmc_platform_data *pdata = pdev->dev.platform_data;
 	struct mmc_host *mmc;
Signature · 1 line
1.6.2
#62 lore raw

PATCH 34/58 move omap_rng's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Russell King <[email protected]>
Cc David Brownell <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Patrick McHardy <[email protected]>
Cc Jan Engelhardt <[email protected]>
Cc Michael Buesch <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/char/hw_random/omap-rng.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/hw_random/omap-rng.c +1 -1
index ba68a46..dc62622 100644
@@ -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;
Signature · 1 line
1.6.2
maintainer Applied
#63 lore raw

Re: [PATCH 34/58] move omap_rng's probe function to .devinit.text

Quoted 10 lines · Uwe Kleine-König

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.

Quoted 8 lines
Cc Russell King <[email protected]>
Cc David Brownell <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Patrick McHardy <[email protected]>
Cc Jan Engelhardt <[email protected]>
Cc Michael Buesch <[email protected]>
Cc Andrew Morton <[email protected]>

Applied to cryptodev. Thanks!

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#64 lore raw

Re: [PATCH 34/58] move omap_rng's probe function to .devinit.text

Quoted 10 lines · Herbert Xu
Quoted 9 lines · Uwe Kleine-König

A pointer to omap_rng_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

Reminder: we're expecting such an updated version, to replace this one.

Quoted 17 lines
Quoted 8 lines
Cc Russell King <[email protected]>
Cc David Brownell <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Patrick McHardy <[email protected]>
Cc Jan Engelhardt <[email protected]>
Cc Michael Buesch <[email protected]>
Cc Andrew Morton <[email protected]>

Applied to cryptodev. Thanks!

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#65 lore raw

PATCH 35/58 move omap_wdt's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Alan Cox <[email protected]>
Cc Wim Van Sebroeck <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc George G. Davis <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/watchdog/omap_wdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/omap_wdt.c +1 -1
index 2f2ce74..c9c14dd 100644
@@ -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;
Signature · 1 line
1.6.2
#66 lore raw

Re: [PATCH 35/58] move omap_wdt's probe function to .devinit.text

Hi Uwe,

Quoted 9 lines

A pointer to omap_wdt_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

Agree with the explanation, but ...

drivers/watchdog/omap_wdt.c static const struct file_operations omap_wdt_fops = { · line 275

Quoted 13 lines
drivers/watchdog/omap_wdt.c +1 -1
index 2f2ce74..c9c14dd 100644
@@ -269,7 +269,7 @@ static const struct file_operations omap_wdt_fops = {
 	.release = omap_wdt_release,
 };
 
-static int __init omap_wdt_probe(struct platform_device *pdev)
+static int __devinit omap_wdt_probe(struct platform_device *pdev)
 {
 	struct resource *res, *mem;
 	struct omap_wdt_dev *wdev;

...imho this would be the correct fix:

drivers/watchdog/omap_wdt.c +3 -3
index aa5ad6e..f271385 100644
@@ -258,7 +258,7 @@ static const struct file_operations omap_wdt_fops = {
 	.release = omap_wdt_release,
 };
 
-static int __init omap_wdt_probe(struct platform_device *pdev)
+static int __devinit omap_wdt_probe(struct platform_device *pdev)
 {
 	struct resource *res, *mem;
 	struct omap_wdt_dev *wdev;
@@ -367,7 +367,7 @@ static void omap_wdt_shutdown(struct platform_device *pdev)
 		omap_wdt_disable(wdev);
 }
 
-static int omap_wdt_remove(struct platform_device *pdev)
+static int __devexit omap_wdt_remove(struct platform_device *pdev)
 {
 	struct omap_wdt_dev *wdev = platform_get_drvdata(pdev);
 	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -426,7 +426,7 @@ static int omap_wdt_resume(struct platform_device *pdev)
 
 static struct platform_driver omap_wdt_driver = {
 	.probe		= omap_wdt_probe,
-	.remove		= omap_wdt_remove,
+	.remove		= __devexit_p(omap_wdt_remove),
 	.shutdown	= omap_wdt_shutdown,
 	.suspend	= omap_wdt_suspend,
 	.resume		= omap_wdt_resume,

Kind regards,
Wim.

#67 lore raw

Re: [PATCH 35/58] move omap_wdt's probe function to .devinit.text

Hi Wim,

Quoted 53 lines · Wim Van Sebroeck

Hi Uwe,

Quoted 9 lines

A pointer to omap_wdt_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

Agree with the explanation, but ...

drivers/watchdog/omap_wdt.c static const struct file_operations omap_wdt_fops = { · line 275

Quoted 13 lines
drivers/watchdog/omap_wdt.c +1 -1
index 2f2ce74..c9c14dd 100644
@@ -269,7 +269,7 @@ static const struct file_operations omap_wdt_fops = {
 	.release = omap_wdt_release,
 };
 
-static int __init omap_wdt_probe(struct platform_device *pdev)
+static int __devinit omap_wdt_probe(struct platform_device *pdev)
 {
 	struct resource *res, *mem;
 	struct omap_wdt_dev *wdev;

...imho this would be the correct fix:

drivers/watchdog/omap_wdt.c +2 -2
index aa5ad6e..f271385 100644
@@ -258,7 +258,7 @@ static const struct file_operations omap_wdt_fops = {
 	.release = omap_wdt_release,
 };
 
-static int __init omap_wdt_probe(struct platform_device *pdev)
+static int __devinit omap_wdt_probe(struct platform_device *pdev)
 {
 	struct resource *res, *mem;
 	struct omap_wdt_dev *wdev;
@@ -367,7 +367,7 @@ static void omap_wdt_shutdown(struct platform_device *pdev)
 		omap_wdt_disable(wdev);
 }
 
-static int omap_wdt_remove(struct platform_device *pdev)
+static int __devexit omap_wdt_remove(struct platform_device *pdev)
 {
 	struct omap_wdt_dev *wdev = platform_get_drvdata(pdev);
 	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

drivers/watchdog/omap_wdt.c static int omap_wdt_resume(struct platform_device *pdev) · line 432

Quoted 8 lines
drivers/watchdog/omap_wdt.c +1 -1
@@ -426,7 +426,7 @@ static int omap_wdt_resume(struct platform_device *pdev)
 
 static struct platform_driver omap_wdt_driver = {
 	.probe		= omap_wdt_probe,
-	.remove		= omap_wdt_remove,
+	.remove		= __devexit_p(omap_wdt_remove),
 	.shutdown	= omap_wdt_shutdown,
 	.suspend	= omap_wdt_suspend,
 	.resume		= omap_wdt_resume,

Your change is OK, but only "my" part is an important fix. With omap_wdt_probe being defined with __init your kernel can oops. omap_wdt_remove only occupies memory for too long if defined without __devexit. That's why I only fixed the first part (with the remove functions on my todo list though).

Grüßle
Uwe

Signature · 6 lines
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#68 lore raw

PATCH 36/58 move orion_nand's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Lennert Buytenhek <[email protected]>
Cc Saeed Bishara <[email protected]>
Cc Jörn Engel <[email protected]>
Cc Nicolas Pitre <[email protected]>
Cc Tzachi Perelstein <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/mtd/nand/orion_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/orion_nand.c +1 -1
index c2dfd3e..8f92fd2 100644
@@ -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;
Signature · 1 line
1.6.2
#69 lore raw

PATCH 37/58 move gen_nand's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc David Woodhouse <[email protected]>
Cc Kay Sievers <[email protected]>
Cc Hamish Moffatt <[email protected]>
Cc David Brownell <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Li Zefan <[email protected]>
Cc Vitaly Wool <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 drivers/mtd/nand/plat_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/plat_nand.c +1 -1
index 75f9f48..86e1d08 100644
@@ -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;
Signature · 1 line
1.6.2
#70 lore raw

PATCH 38/58 move q40fb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Antonino Daplas <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/video/q40fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/q40fb.c +1 -1
index 4beac1d..de40a62 100644
@@ -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;
 
Signature · 1 line
1.6.2
#71 lore raw

PATCH 39/58 move r8a66597_hcd's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Yoshihiro Shimoda <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Magnus Damm <[email protected]>
Cc Stephen Rothwell <[email protected]>
Cc Paul Mundt <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/usb/host/r8a66597-hcd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/r8a66597-hcd.c +1 -1
index f1626e5..3e1216a 100644
@@ -2373,7 +2373,7 @@ static int __init_or_module r8a66597_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static int __init r8a66597_probe(struct platform_device *pdev)
+static int __devinit r8a66597_probe(struct platform_device *pdev)
 {
 #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK)
 	char clk_name[8];
Signature · 1 line
1.6.2
Acked-by on v1 39/58
#72 lore raw

Re: [PATCH 39/58] move r8a66597_hcd's probe function to .devinit.text

Thanks,
Yoshihiro Shimoda

Quoted 34 lines · Uwe Kleine-König

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.

Cc Yoshihiro Shimoda <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Magnus Damm <[email protected]>
Cc Stephen Rothwell <[email protected]>
Cc Paul Mundt <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/usb/host/r8a66597-hcd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/r8a66597-hcd.c +1 -1
index f1626e5..3e1216a 100644
@@ -2373,7 +2373,7 @@ static int __init_or_module r8a66597_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static int __init r8a66597_probe(struct platform_device *pdev)
+static int __devinit r8a66597_probe(struct platform_device *pdev)
 {
 #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK)
 	char clk_name[8];
#73 lore raw

PATCH 40/58 move s3c241xfb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Russell King <[email protected]>
Cc Ben Dooks <[email protected]>
Cc Arnaud Patard <[email protected]>
Cc Krzysztof Helt <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Vincent Sanders <[email protected]>
---
 drivers/video/s3c2410fb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/s3c2410fb.c +2 -2
index 79cf0b1..0ccad2c 100644
@@ -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);
 }
Signature · 1 line
1.6.2
#74 lore raw

PATCH 41/58 move sa11x0-fb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Russell King <[email protected]>
Cc Matthias Kaehlcke <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
 drivers/video/sa1100fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/sa1100fb.c +1 -1
index 076f946..e677012 100644
@@ -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;
Signature · 1 line
1.6.2
#75 lore raw

PATCH 42/58 move flash's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Nicolas Pitre <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Russell King <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/mtd/maps/sa1100-flash.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/maps/sa1100-flash.c +1 -1
index 6f6a0f6..1757ab0 100644
@@ -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;
Signature · 1 line
1.6.2
#76 lore raw

PATCH 43/58 move sb1250-mac's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Weiwei Wang <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc David S. Miller <[email protected]>
Cc Stephen Hemminger <[email protected]>
Cc Maciej W. Rozycki <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/net/sb1250-mac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/sb1250-mac.c +1 -1
index 88dd2e0..8c961b9 100644
@@ -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;
Signature · 1 line
1.6.2
#77 lore raw

PATCH 44/58 move sgiseeq's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Wang Chen <[email protected]>
Cc David S. Miller <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Ralf Baechle <[email protected]>
---
 drivers/net/sgiseeq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/sgiseeq.c +1 -1
index 97d6856..c95da7a 100644
@@ -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;
Signature · 1 line
1.6.2
Acked-by on v1 44/58
#78 lore raw

Re: [PATCH 44/58] move sgiseeq's probe function to .devinit.text

Quoted 10 lines · Uwe Kleine-König

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.

Quoted 7 lines
Cc Wang Chen <[email protected]>
Cc David S. Miller <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Jeff Garzik <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Ralf Baechle <[email protected]>

Ralf

#79 lore raw

PATCH 45/58 move sgivwfb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Antonino Daplas <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Adrian Bunk <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
 drivers/video/sgivwfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/sgivwfb.c +1 -1
index f5252c2..ffe4273 100644
@@ -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;
Signature · 1 line
1.6.2
#80 lore raw

PATCH 46/58 move sgiwd93's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Dmitri Vorobiev <[email protected]>
Cc James Bottomley <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Ralf Baechle <[email protected]>
Cc Andrew Morton <[email protected]>
Cc peter fuerst <[email protected]>
Cc Henrik Kretzschmar <[email protected]>
---
 drivers/scsi/sgiwd93.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/sgiwd93.c +1 -1
index 0807b26..fef0e3c 100644
@@ -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;
Signature · 1 line
1.6.2
Acked-by on v1 46/58
#81 lore raw

Re: [PATCH 46/58] move sgiwd93's probe function to .devinit.text

Quoted 10 lines · Uwe Kleine-König

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.

Quoted 8 lines
Cc Dmitri Vorobiev <[email protected]>
Cc James Bottomley <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Ralf Baechle <[email protected]>
Cc Andrew Morton <[email protected]>
Cc peter fuerst <[email protected]>
Cc Henrik Kretzschmar <[email protected]>

Ralf

#82 lore raw

PATCH 47/58 move sharpsl-pm's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Dmitry Baryshkov <[email protected]>
Cc Russell King <[email protected]>
Cc Eric Miao <[email protected]>
Cc Andrew Morton <[email protected]>
---
 arch/arm/common/sharpsl_pm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/common/sharpsl_pm.c +1 -1
index 780bbf7..e88c9ca 100644
@@ -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;
 
Signature · 1 line
1.6.2
#83 lore raw

Re: [PATCH 47/58] move sharpsl-pm's probe function to .devinit.text

2009/3/28 Uwe Kleine-König <[email protected]>:

Quoted 10 lines

A pointer to sharpsl_pm_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded.  Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

This one looks OK to me.

Quoted 31 lines
Cc Dmitry Baryshkov <[email protected]>
Cc Russell King <[email protected]>
Cc Eric Miao <[email protected]>
Cc Andrew Morton <[email protected]>

---
 arch/arm/common/sharpsl_pm.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/common/sharpsl_pm.c +1 -2
index 780bbf7..e88c9ca 100644
@@ -780,7 +780,7 @@ static struct platform_suspend_ops sharpsl_pm_ops = {
  };
  #endif
 
-static int __init sharpsl_pm_probe(struct platform_device *pdev)
+static int __devinit sharpsl_pm_probe(struct platform_device *pdev)
  {
        int ret;
 
--

1.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Signature · 2 lines
Cheers
- eric
#84 lore raw

Re: [PATCH 47/58] move sharpsl-pm's probe function to .devinit.text

Quoted 7 lines · Eric Miao

2009/3/28 Uwe Kleine-König <[email protected]>:

Quoted 6 lines

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.

Quoted 6 lines
Quoted 4 lines

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

This one looks OK to me.

I assume this is an Acked-by: you?

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
Acked-by
#85 lore raw

Re: [PATCH 47/58] move sharpsl-pm's probe function to .devinit.text

2009/3/29 Uwe Kleine-König <[email protected]>:

Quoted 8 lines · Eric Miao
Quoted 7 lines

2009/3/28 Uwe Kleine-König <[email protected]>:

Quoted 6 lines

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.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

This one looks OK to me.

I assume this is an Acked-by: you?

Quoted 7 lines

Best regards
Uwe

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

Signature · 2 lines
Cheers
- eric
#86 lore raw

PATCH 48/58 move sh_mobile_lcdc_fb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Greg Kroah-Hartman <[email protected]>
Cc Magnus Damm <[email protected]>
Cc Paul Mundt <[email protected]>
Cc Krzysztof Helt <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/video/sh_mobile_lcdcfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/sh_mobile_lcdcfb.c +1 -1
index 92ea0ab..ba795e2 100644
@@ -704,7 +704,7 @@ static struct dev_pm_ops sh_mobile_lcdc_dev_pm_ops = {
 
 static int sh_mobile_lcdc_remove(struct platform_device *pdev);
 
-static int __init sh_mobile_lcdc_probe(struct platform_device *pdev)
+static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev)
 {
 	struct fb_info *info;
 	struct sh_mobile_lcdc_priv *priv;
Signature · 1 line
1.6.2
#87 lore raw

PATCH 49/58 move snd_powermac's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Takashi Iwai <[email protected]>
Cc Jaroslav Kysela <[email protected]>
Cc Johannes Berg <[email protected]>
Cc Rene Herman <[email protected]>
Cc Andrew Morton <[email protected]>
---
 sound/ppc/powermac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/ppc/powermac.c +1 -1
index 5a92906..a2b69b8 100644
@@ -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;
Signature · 1 line
1.6.2
#88 lore raw

Re: [PATCH 49/58] move snd_powermac's probe function to .devinit.text

At Sat, 28 Mar 2009 00:27:10 +0100,

Quoted 11 lines · Uwe Kleine-König

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.

Quoted 6 lines
Cc Takashi Iwai <[email protected]>
Cc Jaroslav Kysela <[email protected]>
Cc Johannes Berg <[email protected]>
Cc Rene Herman <[email protected]>
Cc Andrew Morton <[email protected]>

Applied now to sound git tree. Thanks.

Takashi

Quoted 20 lines
---
 sound/ppc/powermac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/ppc/powermac.c +1 -1
index 5a92906..a2b69b8 100644
@@ -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;
Signature · 1 line
1.6.2
#89 lore raw

PATCH 50/58 move snirm_53c710's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Kay Sievers <[email protected]>
Cc David Brownell <[email protected]>
Cc Andrew Morton <[email protected]>
Cc James Bottomley <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
---
 drivers/scsi/sni_53c710.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/sni_53c710.c +1 -1
index 77f0b2c..9d22539 100644
@@ -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;
Signature · 1 line
1.6.2
#90 lore raw

PATCH 51/58 move stk17ta8's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Anton Vorontsov <[email protected]>
Cc Alessandro Zummo <[email protected]>
Cc David Brownell <[email protected]>
Cc Paul Mundt <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Hannes Eder <[email protected]>
Cc Jiri Kosina <[email protected]>
Cc David Brownell <[email protected]>
---
 drivers/rtc/rtc-stk17ta8.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/rtc/rtc-stk17ta8.c +1 -1
index 7d1547b..d491eb2 100644
@@ -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;
Signature · 1 line
1.6.2
#91 lore raw

PATCH 52/58 move twl4030_usb's probe function to .devinit.text

In reply to Uwe Kleine-König

A pointer to twl4030_usb_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

Cc Jouni Hogander <[email protected]>
Cc Kalle Jokiniemi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Andrew Morton <[email protected]>
Cc David Brownell <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Felipe Balbi <[email protected]>
---
 drivers/usb/otg/twl4030-usb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/otg/twl4030-usb.c +1 -1
index d9478d0..c34e639 100644
@@ -641,7 +641,7 @@ static int twl4030_set_host(struct otg_transceiver *x, struct usb_bus *host)
 	return 0;
 }
 
-static int __init twl4030_usb_probe(struct platform_device *pdev)
+static int __devinit twl4030_usb_probe(struct platform_device *pdev)
 {
 	struct twl4030_usb_data *pdata = pdev->dev.platform_data;
 	struct twl4030_usb	*twl;
Signature · 1 line
1.6.2
#92 lore raw

PATCH 53/58 move omap_udc's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Philipp Zabel <[email protected]>
Cc David Brownell <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc Dmitry Baryshkov <[email protected]>
---
 drivers/usb/gadget/omap_udc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/gadget/omap_udc.c +1 -1
index 57d9641..17755f5 100644
@@ -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;
Signature · 1 line
1.6.2
#93 lore raw

PATCH 54/58 move vesafb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Helge Deller <[email protected]>
Cc James Simmons <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Antonino Daplas <[email protected]>
---
 drivers/video/vesafb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/vesafb.c +1 -1
index e16322d..9022063 100644
@@ -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;
Signature · 1 line
1.6.2
#94 lore raw

PATCH 55/58 move vfb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Frans Pop <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Krzysztof Helt <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/video/vfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/vfb.c +1 -1
index 93fe08d..5ee6bdb 100644
@@ -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;
Signature · 1 line
1.6.2
#95 lore raw

PATCH 56/58 move vga16fb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Krzysztof Helt <[email protected]>
Cc Roel Kluin <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/video/vga16fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/vga16fb.c +1 -1
index 5b29389..76d8dae 100644
@@ -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;
Signature · 1 line
1.6.2
#96 lore raw

PATCH 57/58 move w100fb's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Philipp Zabel <[email protected]>
Cc Ian Molton <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Alberto Mardegan <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/video/w100fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/w100fb.c +1 -1
index d0674f1..c966b12 100644
@@ -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;
Signature · 1 line
1.6.2
#97 lore raw

Re: [PATCH 57/58] move w100fb's probe function to .devinit.text

2009/3/28 Uwe Kleine-König <[email protected]>:

Quoted 9 lines

A pointer to w100fb_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded.  Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

The ATI Imageon chips handled by this driver are not hotpluggable, I think the proposed alternative is the right way. Also, shouldn't w100fb_init be moved from __devinit to __init and w100fb_remove be put into __exit?

Quoted 7 lines
Cc Philipp Zabel <[email protected]>
Cc Ian Molton <[email protected]>
Cc Richard Purdie <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Alberto Mardegan <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/video/w100fb.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
drivers/video/w100fb.c +4 -5
index d0674f1..157e7bd 100644
@@ -781,7 +781,7 @@ out:
 }
 
 
-static int w100fb_remove(struct platform_device *pdev)
+static int __exit w100fb_remove(struct platform_device *pdev)
 {
 	struct fb_info *info = platform_get_drvdata(pdev);
 	struct w100fb_par *par=info->par;
@@ -1609,8 +1609,7 @@ static void w100_vsync(void)
 }
 
 static struct platform_driver w100fb_driver = {
-	.probe		= w100fb_probe,
-	.remove		= w100fb_remove,
+	.remove		= __exit_p(w100fb_remove),
 	.suspend	= w100fb_suspend,
 	.resume		= w100fb_resume,
 	.driver		= {
@@ -1618,9 +1617,9 @@ static struct platform_driver w100fb_driver = {
 	},
 };
 
-int __devinit w100fb_init(void)
+int __init w100fb_init(void)
 {
-	return platform_driver_register(&w100fb_driver);
+	return platform_driver_probe(&w100fb_driver, w100fb_probe);
 }
 
 void __exit w100fb_cleanup(void)
Signature · 1 line
1.6.2.1
#98 lore raw

Re: [PATCH 57/58] move w100fb's probe function to .devinit.text

Hellp pHilipp,

Quoted 7 lines · pHilipp Zabel

2009/3/28 Uwe Kleine-König <[email protected]>:

Quoted 6 lines

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.

Quoted 5 lines
Quoted 3 lines

An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver.

The ATI Imageon chips handled by this driver are not hotpluggable,

what about

sysdriverdir=/sys/bus/platform/drivers/w100fb echo -n w100fb > $sysdriverdir/unbind echo -n w100fb > $sysdriverdir/bind

? (You might have to use w100fb.0 (or another integer id), didn't check

Quoted 3 lines

I think the proposed alternative is the right way. Also, shouldn't w100fb_init be moved from __devinit to __init and w100fb_remove be put into __exit?

I concentrated for now on the probe functions, primarily because a wrong section can result in an oops. If a function is in __devinit instead of __init the only harm is that it occupies RAM.

Other than that your change looks good.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
#99 lore raw

PATCH 58/58 move xtsonic's probe function to .devinit.text

In reply to Uwe Kleine-König

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.

Cc Chris Zankel <[email protected]>
Cc David S. Miller <[email protected]>
Cc Andrew Morton <[email protected]>
---
 drivers/net/xtsonic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/xtsonic.c +1 -1
index a12a721..10f69f8 100644
@@ -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;
Signature · 1 line
1.6.2