summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorGrant Likely2010-04-14 01:13:01 +0200
committerGrant Likely2010-05-22 08:10:40 +0200
commit597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a (patch)
tree373f1f1387143b0ea8811ca6e2a6812f0a86d933 /include/linux/device.h
parentarch/microblaze: Move dma_mask from of_device into pdev_archdata (diff)
downloadkernel-qcow2-linux-597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a.tar.gz
kernel-qcow2-linux-597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a.tar.xz
kernel-qcow2-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 'include/linux/device.h')
-rw-r--r--include/linux/device.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 7a968bdb02e2..cd7534cc42ab 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -129,6 +129,10 @@ struct device_driver {
bool suppress_bind_attrs; /* disables bind/unbind via sysfs */
+#if defined(CONFIG_OF)
+ const struct of_device_id *of_match_table;
+#endif
+
int (*probe) (struct device *dev);
int (*remove) (struct device *dev);
void (*shutdown) (struct device *dev);