summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2013-04-21 16:38:31 -0500
committerGrant Likely <grant.likely@linaro.org>2013-06-12 12:37:16 +0100
commit10dbc5e39a60944536f3ca59bc9a8a8896355714 (patch)
tree586d7c920d11ef3084c850792f7cec8d6952f78d
parent8d561b60a9174defff2e48e109f68a5f2ae7dd9c (diff)
downloadop-kernel-dev-10dbc5e39a60944536f3ca59bc9a8a8896355714.zip
op-kernel-dev-10dbc5e39a60944536f3ca59bc9a8a8896355714.tar.gz
driver core: move to_platform_driver to platform_device.h
In converting the last remaining of_platform_driver (ibmebus) to a regular platform driver, to_platform_driver is needed to replace to_of_platform_driver. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Grant Likely <grant.likely@linaro.org>
-rw-r--r--drivers/base/platform.c3
-rw-r--r--include/linux/platform_device.h3
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 9eda842..1bcb2a7 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -29,9 +29,6 @@
/* For automatically allocated device IDs */
static DEFINE_IDA(platform_devid_ida);
-#define to_platform_driver(drv) (container_of((drv), struct platform_driver, \
- driver))
-
struct device platform_bus = {
.init_name = "platform",
};
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 9abf1db..3413897 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -180,6 +180,9 @@ struct platform_driver {
const struct platform_device_id *id_table;
};
+#define to_platform_driver(drv) (container_of((drv), struct platform_driver, \
+ driver))
+
extern int platform_driver_register(struct platform_driver *);
extern void platform_driver_unregister(struct platform_driver *);
OpenPOWER on IntegriCloud