aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-04-13 19:13:22 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-22 02:10:41 -0400
commit44504b2bebf8b5823c59484e73096a7d6574471d (patch)
treec4d901f026b499f6f0f5c64f4ecbdee297f5db1e /drivers/macintosh
parent4018294b53d1dae026880e45f174c1cc63b5d435 (diff)
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/macintosh')
-rw-r--r--drivers/macintosh/macio_asic.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index e3ba1d8001a3..97147804a49c 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -39,13 +39,12 @@ static struct macio_chip *macio_on_hold;
39 39
40static int macio_bus_match(struct device *dev, struct device_driver *drv) 40static int macio_bus_match(struct device *dev, struct device_driver *drv)
41{ 41{
42 struct macio_dev * macio_dev = to_macio_device(dev);
43 const struct of_device_id * matches = drv->of_match_table; 42 const struct of_device_id * matches = drv->of_match_table;
44 43
45 if (!matches) 44 if (!matches)
46 return 0; 45 return 0;
47 46
48 return of_match_device(matches, &macio_dev->ofdev) != NULL; 47 return of_match_device(matches, dev) != NULL;
49} 48}
50 49
51struct macio_dev *macio_dev_get(struct macio_dev *dev) 50struct macio_dev *macio_dev_get(struct macio_dev *dev)
@@ -83,7 +82,7 @@ static int macio_device_probe(struct device *dev)
83 82
84 macio_dev_get(macio_dev); 83 macio_dev_get(macio_dev);
85 84
86 match = of_match_device(drv->driver.of_match_table, &macio_dev->ofdev); 85 match = of_match_device(drv->driver.of_match_table, dev);
87 if (match) 86 if (match)
88 error = drv->probe(macio_dev, match); 87 error = drv->probe(macio_dev, match);
89 if (error) 88 if (error)