* [PATCH 9/9] net: move am79c961's probe function to .devinit.text [not found] <20100203150850.GA28815@kroah.com> @ 2010-02-04 19:56 ` Uwe Kleine-König 2010-02-04 20:05 ` David Miller 2010-02-17 21:15 ` patch net-move-am79c961-s-probe-function-to-.devinit.text.patch added to gregkh-2.6 tree gregkh 0 siblings, 2 replies; 6+ messages in thread From: Uwe Kleine-König @ 2010-02-04 19:56 UTC (permalink / raw) To: Greg KH, linux-kernel; +Cc: Roel Kluin, Russell King, netdev, Andrew Morton A pointer to am79c961_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Roel Kluin <12o3l@tiscali.nl> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: netdev@vger.kernel.org Cc: Andrew Morton <akpm@linux-foundation.org> --- Hello, @David Miller: this patch is in patchwork with State: Not Applicable. Does that mean that netdev isn't the right tree for this patch? Best regards Uwe drivers/net/arm/am79c961a.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c index 164b37e..1c3c1f9 100644 --- a/drivers/net/arm/am79c961a.c +++ b/drivers/net/arm/am79c961a.c @@ -680,7 +680,7 @@ static const struct net_device_ops am79c961_netdev_ops = { #endif }; -static int __init am79c961_probe(struct platform_device *pdev) +static int __devinit am79c961_probe(struct platform_device *pdev) { struct resource *res; struct net_device *dev; -- 1.6.6 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 9/9] net: move am79c961's probe function to .devinit.text 2010-02-04 19:56 ` [PATCH 9/9] net: move am79c961's probe function to .devinit.text Uwe Kleine-König @ 2010-02-04 20:05 ` David Miller 2010-02-04 20:06 ` Uwe Kleine-König 2010-02-17 21:15 ` patch net-move-am79c961-s-probe-function-to-.devinit.text.patch added to gregkh-2.6 tree gregkh 1 sibling, 1 reply; 6+ messages in thread From: David Miller @ 2010-02-04 20:05 UTC (permalink / raw) To: u.kleine-koenig; +Cc: gregkh, linux-kernel, 12o3l, rmk+kernel, netdev, akpm From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Date: Thu, 4 Feb 2010 20:56:57 +0100 > @David Miller: this patch is in patchwork with State: Not Applicable. > Does that mean that netdev isn't the right tree for this patch? I was under the impression that someone would pick up the whole set as a unit. If you want me to take it into net-next-2.6 I can. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 9/9] net: move am79c961's probe function to .devinit.text 2010-02-04 20:05 ` David Miller @ 2010-02-04 20:06 ` Uwe Kleine-König 2010-02-12 20:11 ` David Miller 2010-02-17 20:46 ` Greg KH 0 siblings, 2 replies; 6+ messages in thread From: Uwe Kleine-König @ 2010-02-04 20:06 UTC (permalink / raw) To: David Miller; +Cc: gregkh, linux-kernel, 12o3l, rmk+kernel, netdev, akpm On Thu, Feb 04, 2010 at 12:05:01PM -0800, David Miller wrote: > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > Date: Thu, 4 Feb 2010 20:56:57 +0100 > > > @David Miller: this patch is in patchwork with State: Not Applicable. > > Does that mean that netdev isn't the right tree for this patch? > > I was under the impression that someone would pick up the > whole set as a unit. Ah, OK. I hope Greg does exactly that now. Thanks Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 9/9] net: move am79c961's probe function to .devinit.text 2010-02-04 20:06 ` Uwe Kleine-König @ 2010-02-12 20:11 ` David Miller 2010-02-17 20:46 ` Greg KH 1 sibling, 0 replies; 6+ messages in thread From: David Miller @ 2010-02-12 20:11 UTC (permalink / raw) To: u.kleine-koenig; +Cc: gregkh, linux-kernel, 12o3l, rmk+kernel, netdev, akpm From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Date: Thu, 4 Feb 2010 21:06:38 +0100 > On Thu, Feb 04, 2010 at 12:05:01PM -0800, David Miller wrote: >> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> >> Date: Thu, 4 Feb 2010 20:56:57 +0100 >> >> > @David Miller: this patch is in patchwork with State: Not Applicable. >> > Does that mean that netdev isn't the right tree for this patch? >> >> I was under the impression that someone would pick up the >> whole set as a unit. > Ah, OK. I hope Greg does exactly that now. I've tossed this into my net-next-2.6 tree anyways to make sure it doesn't get lost. Thanks. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 9/9] net: move am79c961's probe function to .devinit.text 2010-02-04 20:06 ` Uwe Kleine-König 2010-02-12 20:11 ` David Miller @ 2010-02-17 20:46 ` Greg KH 1 sibling, 0 replies; 6+ messages in thread From: Greg KH @ 2010-02-17 20:46 UTC (permalink / raw) To: Uwe Kleine-König Cc: David Miller, gregkh, linux-kernel, 12o3l, rmk+kernel, netdev, akpm On Thu, Feb 04, 2010 at 09:06:38PM +0100, Uwe Kleine-König wrote: > On Thu, Feb 04, 2010 at 12:05:01PM -0800, David Miller wrote: > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > > Date: Thu, 4 Feb 2010 20:56:57 +0100 > > > > > @David Miller: this patch is in patchwork with State: Not Applicable. > > > Does that mean that netdev isn't the right tree for this patch? > > > > I was under the impression that someone would pick up the > > whole set as a unit. > Ah, OK. I hope Greg does exactly that now. I have now done this. thanks, greg k-h ^ permalink raw reply [flat|nested] 6+ messages in thread
* patch net-move-am79c961-s-probe-function-to-.devinit.text.patch added to gregkh-2.6 tree 2010-02-04 19:56 ` [PATCH 9/9] net: move am79c961's probe function to .devinit.text Uwe Kleine-König 2010-02-04 20:05 ` David Miller @ 2010-02-17 21:15 ` gregkh 1 sibling, 0 replies; 6+ messages in thread From: gregkh @ 2010-02-17 21:15 UTC (permalink / raw) To: u.kleine-koenig, 12o3l, akpm, gregkh, netdev, rmk+kernel This is a note to let you know that I've just added the patch titled Subject: net: move am79c961's probe function to .devinit.text to my gregkh-2.6 tree. Its filename is net-move-am79c961-s-probe-function-to-.devinit.text.patch This tree can be found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ From u.kleine-koenig@pengutronix.de Wed Feb 17 12:45:57 2010 From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Date: Thu, 4 Feb 2010 20:56:57 +0100 Subject: net: move am79c961's probe function to .devinit.text To: Greg KH <gregkh@suse.de> Cc: Roel Kluin <12o3l@tiscali.nl>, Russell King <rmk+kernel@arm.linux.org.uk>, netdev@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org> Message-ID: <1265313417-5568-9-git-send-email-u.kleine-koenig@pengutronix.de> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> A pointer to am79c961_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Roel Kluin <12o3l@tiscali.nl> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: <netdev@vger.kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/net/arm/am79c961a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/arm/am79c961a.c +++ b/drivers/net/arm/am79c961a.c @@ -680,7 +680,7 @@ static const struct net_device_ops am79c #endif }; -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; ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-02-17 21:15 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20100203150850.GA28815@kroah.com> 2010-02-04 19:56 ` [PATCH 9/9] net: move am79c961's probe function to .devinit.text Uwe Kleine-König 2010-02-04 20:05 ` David Miller 2010-02-04 20:06 ` Uwe Kleine-König 2010-02-12 20:11 ` David Miller 2010-02-17 20:46 ` Greg KH 2010-02-17 21:15 ` patch net-move-am79c961-s-probe-function-to-.devinit.text.patch added to gregkh-2.6 tree gregkh
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).