diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 16:13:22 -0700 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 00:10:41 -0600 |
commit | 44504b2bebf8b5823c59484e73096a7d6574471d (patch) | |
tree | c4d901f026b499f6f0f5c64f4ecbdee297f5db1e /drivers/of/device.c | |
parent | 4018294b53d1dae026880e45f174c1cc63b5d435 (diff) | |
download | op-kernel-dev-44504b2bebf8b5823c59484e73096a7d6574471d.zip op-kernel-dev-44504b2bebf8b5823c59484e73096a7d6574471d.tar.gz |
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/device.c')
-rw-r--r-- | drivers/of/device.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/of/device.c b/drivers/of/device.c index 24068bb..7d18f8e 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -10,8 +10,7 @@ #include <asm/errno.h> /** - * of_match_device - Tell if an of_device structure has a matching - * of_match structure + * of_match_device - Tell if a struct device matches an of_device_id list * @ids: array of of device match structures to search in * @dev: the of device structure to match against * @@ -19,11 +18,11 @@ * system is in its list of supported devices. */ const struct of_device_id *of_match_device(const struct of_device_id *matches, - const struct of_device *dev) + const struct device *dev) { - if (!dev->dev.of_node) + if (!dev->of_node) return NULL; - return of_match_node(matches, dev->dev.of_node); + return of_match_node(matches, dev->of_node); } EXPORT_SYMBOL(of_match_device); |