Driver core: move platform device creation helpers to .init.text (if MODULE=n)
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 21 Jun 2010 14:11:45 +0000 (16:11 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 5 Aug 2010 20:53:34 +0000 (13:53 -0700)
Platform devices should only be called by init code, so it should be
possible to move creation helpers to .init.text -- at least if modules
are disabled.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/platform.c

index ffcfd73fe8a6abcd2c8ccd885a538c8f694abedf..1bb8faaa443fc435346de1861c1e4ed556d4edb1 100644 (file)
@@ -357,7 +357,7 @@ EXPORT_SYMBOL_GPL(platform_device_unregister);
  *
  * Returns &struct platform_device pointer on success, or ERR_PTR() on error.
  */
-struct platform_device *platform_device_register_resndata(
+struct platform_device *__init_or_module platform_device_register_resndata(
                struct device *parent,
                const char *name, int id,
                const struct resource *res, unsigned int num,