* [PATCH] move jazzsonic's probe function to .devinit.text
@ 2009-07-21 21:25 Uwe Kleine-König
2009-07-21 21:25 ` [PATCH] move macsonic's " Uwe Kleine-König
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2009-07-21 21:25 UTC (permalink / raw)
To: netdev
Cc: Jeff Garzik, David S. Miller, Thomas Bogendoerfer, Finn Thain,
Geert Uytterhoeven, Andrew Morton, Greg Kroah-Hartman
A pointer to jazz_sonic_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
As noticed by Geert Uytterhoeven sonic_probe1 is called by
jazz_sonic_probe, so the former has to move to .devinit.text, too.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: netdev@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/jazzsonic.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
index d12106b..8baf595 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -108,7 +108,7 @@ static const struct net_device_ops sonic_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr,
};
-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;
@@ -211,7 +211,7 @@ out:
* Probe for a SONIC ethernet controller on a Mips Jazz board.
* Actually probing is superfluous but we're paranoid.
*/
-static int __init jazz_sonic_probe(struct platform_device *pdev)
+static int __devinit jazz_sonic_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct sonic_local *lp;
--
tg: (aea1f79..) t/platsection/jazz_sonic_driver (depends on: linus/master)
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH] move macsonic's probe function to .devinit.text
2009-07-21 21:25 [PATCH] move jazzsonic's probe function to .devinit.text Uwe Kleine-König
@ 2009-07-21 21:25 ` Uwe Kleine-König
2009-07-22 3:13 ` David Miller
2009-07-21 21:25 ` [PATCH] move meth's " Uwe Kleine-König
` (4 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Uwe Kleine-König @ 2009-07-21 21:25 UTC (permalink / raw)
To: netdev
Cc: Jeff Garzik, David S. Miller, Geert Uytterhoeven, Andrew Morton,
Greg Kroah-Hartman
A pointer to mac_sonic_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
Various other functions that are called by mac_sonic_probe need to move
to .devinit.text, too.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Tested-by: Finn Thain <fthain@telegraphics.com.au>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: netdev@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/macsonic.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c
index acd143d..8f492c7 100644
--- a/drivers/net/macsonic.c
+++ b/drivers/net/macsonic.c
@@ -179,7 +179,7 @@ static const struct net_device_ops macsonic_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr,
};
-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);
@@ -223,7 +223,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;
@@ -288,7 +288,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;
@@ -409,7 +409,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)
{
@@ -424,7 +424,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)
@@ -449,7 +449,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;
@@ -562,7 +562,7 @@ static int __init mac_nubus_sonic_probe(struct net_device *dev)
return macsonic_init(dev);
}
-static int __init mac_sonic_probe(struct platform_device *pdev)
+static int __devinit mac_sonic_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct sonic_local *lp;
--
tg: (aea1f79..) t/platsection/mac_sonic_driver (depends on: linus/master)
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH] move meth's probe function to .devinit.text
2009-07-21 21:25 [PATCH] move jazzsonic's probe function to .devinit.text Uwe Kleine-König
2009-07-21 21:25 ` [PATCH] move macsonic's " Uwe Kleine-König
@ 2009-07-21 21:25 ` Uwe Kleine-König
2009-07-22 3:12 ` David Miller
2009-07-21 21:25 ` [PATCH] move sb1250-mac's " Uwe Kleine-König
` (3 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Uwe Kleine-König @ 2009-07-21 21:25 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Thomas Bogendoerfer, Christoph Lameter,
Jeff Garzik, Andrew Morton, Greg Kroah-Hartman
A pointer to meth_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Jeff Garzik <jgarzik@redhat.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: netdev@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/meth.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index 5d04d94..0dddb02 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -784,7 +784,7 @@ static const struct net_device_ops meth_netdev_ops = {
/*
* 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;
--
tg: (aea1f79..) t/platsection/meth_driver (depends on: linus/master)
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH] move sb1250-mac's probe function to .devinit.text
2009-07-21 21:25 [PATCH] move jazzsonic's probe function to .devinit.text Uwe Kleine-König
2009-07-21 21:25 ` [PATCH] move macsonic's " Uwe Kleine-König
2009-07-21 21:25 ` [PATCH] move meth's " Uwe Kleine-König
@ 2009-07-21 21:25 ` Uwe Kleine-König
2009-07-22 3:13 ` David Miller
2009-07-21 21:25 ` [PATCH] move sgiseeq's " Uwe Kleine-König
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Uwe Kleine-König @ 2009-07-21 21:25 UTC (permalink / raw)
To: netdev
Cc: Weiwei Wang, Jeff Garzik, David S. Miller, Stephen Hemminger,
Andrew Morton, Greg Kroah-Hartman
A pointer to sbmac_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Weiwei Wang <weiwei.wang@windriver.com>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: netdev@vger.kernel.org
---
drivers/net/sb1250-mac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
index d8c9cf1..96b37b9 100644
--- a/drivers/net/sb1250-mac.c
+++ b/drivers/net/sb1250-mac.c
@@ -2688,7 +2688,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;
--
tg: (aea1f79..) t/platsection/sbmac_driver (depends on: linus/master)
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH] move sgiseeq's probe function to .devinit.text
2009-07-21 21:25 [PATCH] move jazzsonic's probe function to .devinit.text Uwe Kleine-König
` (2 preceding siblings ...)
2009-07-21 21:25 ` [PATCH] move sb1250-mac's " Uwe Kleine-König
@ 2009-07-21 21:25 ` Uwe Kleine-König
2009-07-22 3:13 ` David Miller
2009-07-21 21:25 ` [PATCH] move xtsonic's " Uwe Kleine-König
2009-07-22 3:13 ` [PATCH] move jazzsonic's " David Miller
5 siblings, 1 reply; 13+ messages in thread
From: Uwe Kleine-König @ 2009-07-21 21:25 UTC (permalink / raw)
To: netdev
Cc: Wang Chen, David S. Miller, Andrew Morton, Jeff Garzik,
Thomas Bogendoerfer, Greg Kroah-Hartman
A pointer to sgiseeq_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Wang Chen <wangchen@cn.fujitsu.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: netdev@vger.kernel.org
---
drivers/net/sgiseeq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c
index 5fb88ca..53fa4f6 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -720,7 +720,7 @@ static const struct net_device_ops sgiseeq_netdev_ops = {
.ndo_validate_addr = eth_validate_addr,
};
-static int __init sgiseeq_probe(struct platform_device *pdev)
+static int __devinit sgiseeq_probe(struct platform_device *pdev)
{
struct sgiseeq_platform_data *pd = pdev->dev.platform_data;
struct hpc3_regs *hpcregs = pd->hpc;
--
tg: (aea1f79..) t/platsection/sgiseeq_driver (depends on: linus/master)
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH] move xtsonic's probe function to .devinit.text
2009-07-21 21:25 [PATCH] move jazzsonic's probe function to .devinit.text Uwe Kleine-König
` (3 preceding siblings ...)
2009-07-21 21:25 ` [PATCH] move sgiseeq's " Uwe Kleine-König
@ 2009-07-21 21:25 ` Uwe Kleine-König
2009-07-22 0:00 ` Chris Zankel
2009-07-22 3:13 ` David Miller
2009-07-22 3:13 ` [PATCH] move jazzsonic's " David Miller
5 siblings, 2 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2009-07-21 21:25 UTC (permalink / raw)
To: netdev; +Cc: Chris Zankel, David S. Miller, Andrew Morton, Greg Kroah-Hartman
A pointer to xtsonic_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Chris Zankel <chris@zankel.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: netdev@vger.kernel.org
---
drivers/net/xtsonic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/xtsonic.c b/drivers/net/xtsonic.c
index 5a4ad15..0c44135 100644
--- a/drivers/net/xtsonic.c
+++ b/drivers/net/xtsonic.c
@@ -239,7 +239,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;
--
tg: (aea1f79..) t/platsection/xtsonic_driver (depends on: linus/master)
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] move xtsonic's probe function to .devinit.text
2009-07-21 21:25 ` [PATCH] move xtsonic's " Uwe Kleine-König
@ 2009-07-22 0:00 ` Chris Zankel
2009-07-22 3:13 ` David Miller
1 sibling, 0 replies; 13+ messages in thread
From: Chris Zankel @ 2009-07-22 0:00 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: netdev, David S. Miller, Andrew Morton, Greg Kroah-Hartman
Hi Uwe,
I will add it to the Xtensa tree in the next couple of days (together
with other patches that have piled up - still fighting a compiler issue).
Thanks,
-Chris
Uwe Kleine-König wrote:
> A pointer to xtsonic_probe is passed to the core via
> platform_driver_register and so the function must not disappear when the
> .init sections are discarded. Otherwise (if also having HOTPLUG=y)
> unbinding and binding a device to the driver via sysfs will result in an
> oops as does a device being registered late.
>
> An alternative to this patch is using platform_driver_probe instead of
> platform_driver_register plus removing the pointer to the probe function
> from the struct platform_driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Chris Zankel <chris@zankel.net>
>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Cc: netdev@vger.kernel.org
>
> ---
> drivers/net/xtsonic.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/xtsonic.c b/drivers/net/xtsonic.c
> index 5a4ad15..0c44135 100644
> --- a/drivers/net/xtsonic.c
> +++ b/drivers/net/xtsonic.c
> @@ -239,7 +239,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;
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] move meth's probe function to .devinit.text
2009-07-21 21:25 ` [PATCH] move meth's " Uwe Kleine-König
@ 2009-07-22 3:12 ` David Miller
0 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2009-07-22 3:12 UTC (permalink / raw)
To: u.kleine-koenig; +Cc: netdev, tsbogend, cl, jgarzik, akpm, gregkh
Applied.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] move macsonic's probe function to .devinit.text
2009-07-21 21:25 ` [PATCH] move macsonic's " Uwe Kleine-König
@ 2009-07-22 3:13 ` David Miller
0 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2009-07-22 3:13 UTC (permalink / raw)
To: u.kleine-koenig; +Cc: netdev, jgarzik, geert, akpm, gregkh
Applied.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] move xtsonic's probe function to .devinit.text
2009-07-21 21:25 ` [PATCH] move xtsonic's " Uwe Kleine-König
2009-07-22 0:00 ` Chris Zankel
@ 2009-07-22 3:13 ` David Miller
1 sibling, 0 replies; 13+ messages in thread
From: David Miller @ 2009-07-22 3:13 UTC (permalink / raw)
To: u.kleine-koenig; +Cc: netdev, chris, akpm, gregkh
Applied.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] move jazzsonic's probe function to .devinit.text
2009-07-21 21:25 [PATCH] move jazzsonic's probe function to .devinit.text Uwe Kleine-König
` (4 preceding siblings ...)
2009-07-21 21:25 ` [PATCH] move xtsonic's " Uwe Kleine-König
@ 2009-07-22 3:13 ` David Miller
5 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2009-07-22 3:13 UTC (permalink / raw)
To: u.kleine-koenig; +Cc: netdev, jeff, tsbogend, fthain, geert, akpm, gregkh
Applied.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] move sb1250-mac's probe function to .devinit.text
2009-07-21 21:25 ` [PATCH] move sb1250-mac's " Uwe Kleine-König
@ 2009-07-22 3:13 ` David Miller
0 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2009-07-22 3:13 UTC (permalink / raw)
To: u.kleine-koenig; +Cc: netdev, weiwei.wang, jgarzik, shemminger, akpm, gregkh
Applied.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] move sgiseeq's probe function to .devinit.text
2009-07-21 21:25 ` [PATCH] move sgiseeq's " Uwe Kleine-König
@ 2009-07-22 3:13 ` David Miller
0 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2009-07-22 3:13 UTC (permalink / raw)
To: u.kleine-koenig; +Cc: netdev, wangchen, akpm, jgarzik, tsbogend, gregkh
Applied.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-07-22 3:13 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 21:25 [PATCH] move jazzsonic's probe function to .devinit.text Uwe Kleine-König
2009-07-21 21:25 ` [PATCH] move macsonic's " Uwe Kleine-König
2009-07-22 3:13 ` David Miller
2009-07-21 21:25 ` [PATCH] move meth's " Uwe Kleine-König
2009-07-22 3:12 ` David Miller
2009-07-21 21:25 ` [PATCH] move sb1250-mac's " Uwe Kleine-König
2009-07-22 3:13 ` David Miller
2009-07-21 21:25 ` [PATCH] move sgiseeq's " Uwe Kleine-König
2009-07-22 3:13 ` David Miller
2009-07-21 21:25 ` [PATCH] move xtsonic's " Uwe Kleine-König
2009-07-22 0:00 ` Chris Zankel
2009-07-22 3:13 ` David Miller
2009-07-22 3:13 ` [PATCH] move jazzsonic's " David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).