[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1366596798-9457-3-git-send-email-robherring2@gmail.com>
Date: Sun, 21 Apr 2013 21:13:15 -0500
From: Rob Herring <robherring2@...il.com>
To: linux-kernel@...r.kernel.org, devicetree-discuss@...ts.ozlabs.org
Cc: Grant Likely <grant.likely@...aro.org>,
Arnd Bergmann <arnd@...db.de>,
Rob Herring <rob.herring@...xeda.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH 2/5] driver core: move to_platform_driver to platform_device.h
From: Rob Herring <rob.herring@...xeda.com>
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@...xeda.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Grant Likely <grant.likely@...aro.org>
---
drivers/base/platform.c | 3 ---
include/linux/platform_device.h | 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index c0b8df3..819ecb0 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 c082c71..6e4e096 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -176,6 +176,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 *);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists