summaryrefslogtreecommitdiffstats
path: root/drivers/of/platform.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-04-14 01:13:22 +0200
committerGrant Likely <grant.likely@secretlab.ca>2010-05-22 08:10:41 +0200
commit44504b2bebf8b5823c59484e73096a7d6574471d (patch)
treec4d901f026b499f6f0f5c64f4ecbdee297f5db1e /drivers/of/platform.c
parentof: Remove duplicate fields from of_platform_driver (diff)
downloadlinux-44504b2bebf8b5823c59484e73096a7d6574471d.tar.xz
linux-44504b2bebf8b5823c59484e73096a7d6574471d.zip
of: change of_match_device to work with struct device
The of_node pointer is now stored directly in struct device, so of_match_device() should work with any device, not just struct of_device. This patch changes the interface to of_match_device() to accept a struct device instead of struct of_device. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/of/platform.c')
-rw-r--r--drivers/of/platform.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index ba402c613ede..7dacc1ebe91e 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -21,13 +21,12 @@ extern struct device_attribute of_platform_device_attrs[];
static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
{
- struct of_device *of_dev = to_of_device(dev);
const struct of_device_id *matches = drv->of_match_table;
if (!matches)
return 0;
- return of_match_device(matches, of_dev) != NULL;
+ return of_match_device(matches, dev) != NULL;
}
static int of_platform_device_probe(struct device *dev)
@@ -45,7 +44,7 @@ static int of_platform_device_probe(struct device *dev)
of_dev_get(of_dev);
- match = of_match_device(drv->driver.of_match_table, of_dev);
+ match = of_match_device(drv->driver.of_match_table, dev);
if (match)
error = drv->probe(of_dev, match);
if (error)