[PATCH 11/28] Driver core: move platform device creation helpers to .init.text (if MODULE=n)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg Kroah-Hartman
Date: Thursday, August 5, 2010 - 3:24 pm

From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index ffcfd73..1bb8faa 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -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,
-- 
1.7.2

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PATCH] driver core patches for .36, Greg KH, (Thu Aug 5, 2:33 pm)
[PATCH 01/28] uio: Remove IRQF_DISABLED flag from uio_pdrv ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 02/28] uio: Remove IRQF_DISABLED from uio_sercos3.c, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 03/28] uio: Remove IRQF_DISABLED flag from uio_cif.c, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 04/28] hotplug: Support kernel/hotplug sysctl varia ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 05/28] Driver core: internal struct dma_coherent_me ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 06/28] Driver core: Drop __must_check from bus_for_ ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 07/28] firmware loader: use statically initialized ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 08/28] firmware loader: embed device into firmware_ ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 09/28] Driver core: use kmemdup in platform_device_ ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 10/28] Driver core: reduce duplicated code for plat ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 11/28] Driver core: move platform device creation h ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 12/28] firmware: Update hotplug script, Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 13/28] sysfs: sysfs_chmod_file's attr can be const, Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 14/28] dmi-id: fix a memory leak in dmi_id_init err ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 15/28] dcdbas: remove a redundant smi_data_buf_free ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 16/28] sysfs: fix discrepancies between implementat ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 17/28] sysfs: Fix one more signature discrepancy be ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 18/28] debugfs: no longer needs to depend on SYSFS, Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 19/28] driver core: fix memory leak on one error pa ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 20/28] Driver core: Add BUS_NOTIFY_BIND_DRIVER, Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 21/28] cgroupfs: create /sys/fs/cgroup to mount cgr ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 22/28] scsi: Remove owner field from attribute init ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 23/28] scsi: Remove owner field from attribute init ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 24/28] leds: Remove owner field from attribute init ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 25/28] regulator: Remove owner field from attribute ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 26/28] powerpc/pci: Remove owner field from attribu ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 27/28] sysfs: Remove owner field from sysfs struct ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 28/28] driver core: device_rename's new_name can be ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)