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>
This commit is contained in:
Grant Likely 2010-04-13 16:13:01 -07:00
parent 173b3a7a05
commit 597b9d1e44
4 changed files with 14 additions and 7 deletions

View file

@ -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);