diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 16:13:01 -0700 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 00:10:40 -0600 |
commit | 597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a (patch) | |
tree | 373f1f1387143b0ea8811ca6e2a6812f0a86d933 /drivers/macintosh | |
parent | 173b3a7a059a6998a6c0733710818c473cc0de4c (diff) | |
download | linux-597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a.tar.gz linux-597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a.tar.bz2 linux-597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a.zip |
drivercore: Add of_match_table to the common device drivers
OF-style matching can be available to any device, on any type of bus.
This patch allows any driver to provide an OF match table when CONFIG_OF
is enabled so that drivers can be bound against devices described in
the device tree.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/macio_asic.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index 48a5f0406865..e3ba1d8001a3 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c @@ -40,8 +40,7 @@ static struct macio_chip *macio_on_hold; static int macio_bus_match(struct device *dev, struct device_driver *drv) { struct macio_dev * macio_dev = to_macio_device(dev); - struct macio_driver * macio_drv = to_macio_driver(drv); - const struct of_device_id * matches = macio_drv->match_table; + const struct of_device_id * matches = drv->of_match_table; if (!matches) return 0; @@ -84,7 +83,7 @@ static int macio_device_probe(struct device *dev) macio_dev_get(macio_dev); - match = of_match_device(drv->match_table, &macio_dev->ofdev); + match = of_match_device(drv->driver.of_match_table, &macio_dev->ofdev); if (match) error = drv->probe(macio_dev, match); if (error) |