Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755775AbZC1SoT (ORCPT ); Sat, 28 Mar 2009 14:44:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753024AbZC1SoD (ORCPT ); Sat, 28 Mar 2009 14:44:03 -0400 Received: from mail-bw0-f169.google.com ([209.85.218.169]:58634 "EHLO mail-bw0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751867AbZC1SoA convert rfc822-to-8bit (ORCPT ); Sat, 28 Mar 2009 14:44:00 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=KQa3H0crKn7kB7Nf2E3XVvbBSNqnj3TlOSf48oea5LVAFmsozhv1/9WbRr73h7QiV9 w+Gc1kVY+xA2ukn19hNceo6oqVAX6hjpc3e7o4lIjhfgPI5EY2NDMpts99cGYCoNE+1t LjL0PqPEKwFc4HO0++j6iw8z6PStY2vTSSB50= MIME-Version: 1.0 In-Reply-To: <1238196439-16535-7-git-send-email-u.kleine-koenig@pengutronix.de> References: <20090327232153.GA16348@pengutronix.de> <1238196439-16535-7-git-send-email-u.kleine-koenig@pengutronix.de> Date: Sat, 28 Mar 2009 18:43:57 +0000 Message-ID: Subject: Re: [PATCH 07/58] move cfag12864bfb's probe function to .devinit.text From: Miguel Ojeda To: =?ISO-8859-1?Q?Uwe_Kleine=2DK=F6nig?= Cc: linux-kernel@vger.kernel.org, Andrew Morton , Avuton Olrich , Antonino Daplas Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1769 Lines: 45 2009/3/27 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. > ACK, thank you! > Signed-off-by: Uwe Kleine-K?nig > Cc: Miguel Ojeda > Cc: Andrew Morton > Cc: Avuton Olrich > Cc: Antonino Daplas > --- > ?drivers/auxdisplay/cfag12864bfb.c | ? ?2 +- > ?1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c > index fe3a865..b0ca5a4 100644 > --- a/drivers/auxdisplay/cfag12864bfb.c > +++ b/drivers/auxdisplay/cfag12864bfb.c > @@ -81,7 +81,7 @@ static struct fb_ops cfag12864bfb_ops = { > ? ? ? ?.fb_mmap = cfag12864bfb_mmap, > ?}; > > -static int __init cfag12864bfb_probe(struct platform_device *device) > +static int __devinit cfag12864bfb_probe(struct platform_device *device) > ?{ > ? ? ? ?int ret = -EINVAL; > ? ? ? ?struct fb_info *info = framebuffer_alloc(0, &device->dev); > -- > 1.6.2 > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/