driver core: move to_platform_driver to platform_device.h
authorRob Herring <rob.herring@calxeda.com>
Sun, 21 Apr 2013 21:38:31 +0000 (16:38 -0500)
committerGrant Likely <grant.likely@linaro.org>
Wed, 12 Jun 2013 11:37:16 +0000 (12:37 +0100)
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>
drivers/base/platform.c
include/linux/platform_device.h

index 9eda84246ffd5eda7d1d6947ef27a5ba05a75951..1bcb2a792e95cfddbc4c7126935bc6aed786fa2c 100644 (file)
@@ -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",
 };
index 9abf1db6aea652ee28152f39bd7e024995f07c75..3413897474e17bf09358489c3e483a8e58e19a50 100644 (file)
@@ -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 *);