mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] move cfag12864bfb's probe function to .devinit.text
Date: Tue, 20 Jan 2009 10:29:44 +0100	[thread overview]
Message-ID: <20090120092944.GA2369@pengutronix.de> (raw)
In-Reply-To: <ca2dc2820901200013y3723785cjb4ca4a0e223f7993@mail.gmail.com>

Hello Miguel,

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

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

Best regards
Uwe

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

  reply	other threads:[~2009-01-20  9:30 UTC|newest]

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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090120092944.GA2369@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome