aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/platform.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-07-22 15:59:23 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-07-24 11:58:21 -0400
commit94a0cb1fc61ab7a0d47d268a7764374efeb2160b (patch)
treec7da45e6023c77471e18215fb14eab1bc83739fa /drivers/of/platform.c
parentc1b6d380b781b5238989a4bfba02450057670804 (diff)
of/device: Replace of_device with platform_device in includes and core code
of_device is currently just an #define alias to platform_device until it gets removed entirely. This patch removes references to it from the include directories and the core drivers/of code. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/of/platform.c')
-rw-r--r--drivers/of/platform.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index f3f1ec81ef48..9f3840cdcde5 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -94,11 +94,11 @@ static int of_platform_device_probe(struct device *dev)
94{ 94{
95 int error = -ENODEV; 95 int error = -ENODEV;
96 struct of_platform_driver *drv; 96 struct of_platform_driver *drv;
97 struct of_device *of_dev; 97 struct platform_device *of_dev;
98 const struct of_device_id *match; 98 const struct of_device_id *match;
99 99
100 drv = to_of_platform_driver(dev->driver); 100 drv = to_of_platform_driver(dev->driver);
101 of_dev = to_of_device(dev); 101 of_dev = to_platform_device(dev);
102 102
103 if (!drv->probe) 103 if (!drv->probe)
104 return error; 104 return error;
@@ -116,7 +116,7 @@ static int of_platform_device_probe(struct device *dev)
116 116
117static int of_platform_device_remove(struct device *dev) 117static int of_platform_device_remove(struct device *dev)
118{ 118{
119 struct of_device *of_dev = to_of_device(dev); 119 struct platform_device *of_dev = to_platform_device(dev);
120 struct of_platform_driver *drv = to_of_platform_driver(dev->driver); 120 struct of_platform_driver *drv = to_of_platform_driver(dev->driver);
121 121
122 if (dev->driver && drv->remove) 122 if (dev->driver && drv->remove)
@@ -126,7 +126,7 @@ static int of_platform_device_remove(struct device *dev)
126 126
127static void of_platform_device_shutdown(struct device *dev) 127static void of_platform_device_shutdown(struct device *dev)
128{ 128{
129 struct of_device *of_dev = to_of_device(dev); 129 struct platform_device *of_dev = to_platform_device(dev);
130 struct of_platform_driver *drv = to_of_platform_driver(dev->driver); 130 struct of_platform_driver *drv = to_of_platform_driver(dev->driver);
131 131
132 if (dev->driver && drv->shutdown) 132 if (dev->driver && drv->shutdown)
@@ -137,7 +137,7 @@ static void of_platform_device_shutdown(struct device *dev)
137 137
138static int of_platform_legacy_suspend(struct device *dev, pm_message_t mesg) 138static int of_platform_legacy_suspend(struct device *dev, pm_message_t mesg)
139{ 139{
140 struct of_device *of_dev = to_of_device(dev); 140 struct platform_device *of_dev = to_platform_device(dev);
141 struct of_platform_driver *drv = to_of_platform_driver(dev->driver); 141 struct of_platform_driver *drv = to_of_platform_driver(dev->driver);
142 int ret = 0; 142 int ret = 0;
143 143
@@ -148,7 +148,7 @@ static int of_platform_legacy_suspend(struct device *dev, pm_message_t mesg)
148 148
149static int of_platform_legacy_resume(struct device *dev) 149static int of_platform_legacy_resume(struct device *dev)
150{ 150{
151 struct of_device *of_dev = to_of_device(dev); 151 struct platform_device *of_dev = to_platform_device(dev);
152 struct of_platform_driver *drv = to_of_platform_driver(dev->driver); 152 struct of_platform_driver *drv = to_of_platform_driver(dev->driver);
153 int ret = 0; 153 int ret = 0;
154 154
@@ -543,11 +543,11 @@ static void of_device_make_bus_id(struct device *dev)
543 * @bus_id: Name to assign to the device. May be null to use default name. 543 * @bus_id: Name to assign to the device. May be null to use default name.
544 * @parent: Parent device. 544 * @parent: Parent device.
545 */ 545 */
546struct of_device *of_device_alloc(struct device_node *np, 546struct platform_device *of_device_alloc(struct device_node *np,
547 const char *bus_id, 547 const char *bus_id,
548 struct device *parent) 548 struct device *parent)
549{ 549{
550 struct of_device *dev; 550 struct platform_device *dev;
551 int rc, i, num_reg = 0, num_irq = 0; 551 int rc, i, num_reg = 0, num_irq = 0;
552 struct resource *res, temp_res; 552 struct resource *res, temp_res;
553 553
@@ -600,11 +600,11 @@ EXPORT_SYMBOL(of_device_alloc);
600 * @bus_id: name to assign device 600 * @bus_id: name to assign device
601 * @parent: Linux device model parent device. 601 * @parent: Linux device model parent device.
602 */ 602 */
603struct of_device *of_platform_device_create(struct device_node *np, 603struct platform_device *of_platform_device_create(struct device_node *np,
604 const char *bus_id, 604 const char *bus_id,
605 struct device *parent) 605 struct device *parent)
606{ 606{
607 struct of_device *dev; 607 struct platform_device *dev;
608 608
609 dev = of_device_alloc(np, bus_id, parent); 609 dev = of_device_alloc(np, bus_id, parent);
610 if (!dev) 610 if (!dev)
@@ -642,7 +642,7 @@ static int of_platform_bus_create(const struct device_node *bus,
642 struct device *parent) 642 struct device *parent)
643{ 643{
644 struct device_node *child; 644 struct device_node *child;
645 struct of_device *dev; 645 struct platform_device *dev;
646 int rc = 0; 646 int rc = 0;
647 647
648 for_each_child_of_node(bus, child) { 648 for_each_child_of_node(bus, child) {
@@ -678,7 +678,7 @@ int of_platform_bus_probe(struct device_node *root,
678 struct device *parent) 678 struct device *parent)
679{ 679{
680 struct device_node *child; 680 struct device_node *child;
681 struct of_device *dev; 681 struct platform_device *dev;
682 int rc = 0; 682 int rc = 0;
683 683
684 if (matches == NULL) 684 if (matches == NULL)