diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 17:28:10 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 17:28:10 -0700 |
commit | 4c5811bf463b0ef82fabbd1708f8bb2d753aeb18 (patch) | |
tree | ff37d31217c3804ca05de21a55a9b5ca1ca818b2 /include | |
parent | f74b9444192c60603020c61d7915b72893137edc (diff) | |
parent | 9f15444fefdb33509132ff5c9be60cb315c44cb2 (diff) | |
download | linux-4c5811bf463b0ef82fabbd1708f8bb2d753aeb18.tar.bz2 |
Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits)
tty: serial: altera_jtaguart: Add device tree support
tty: serial: altera_uart: Add devicetree support
dt: eliminate of_platform_driver shim code
dt: Eliminate of_platform_{,un}register_driver
dt/serial: Eliminate users of of_platform_{,un}register_driver
dt/usb: Eliminate users of of_platform_{,un}register_driver
dt/video: Eliminate users of of_platform_{,un}register_driver
dt/net: Eliminate users of of_platform_{,un}register_driver
dt/sound: Eliminate users of of_platform_{,un}register_driver
dt/spi: Eliminate users of of_platform_{,un}register_driver
dt: uartlite: merge platform and of_platform driver bindings
dt: xilinx_hwicap: merge platform and of_platform driver bindings
ipmi: convert OF driver to platform driver
leds/leds-gpio: merge platform_driver with of_platform_driver
dt/sparc: Eliminate users of of_platform_{,un}register_driver
dt/powerpc: Eliminate users of of_platform_{,un}register_driver
dt/powerpc: move of_bus_type infrastructure to ibmebus
drivercore/dt: add a match table pointer to struct device
dt: Typo fix.
altera_ps2: Add devicetree support
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/device.h | 1 | ||||
-rw-r--r-- | include/linux/of.h | 2 | ||||
-rw-r--r-- | include/linux/of_device.h | 5 | ||||
-rw-r--r-- | include/linux/of_platform.h | 18 |
4 files changed, 6 insertions, 20 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index dba775a68752..144ec135875f 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -442,6 +442,7 @@ struct device { struct dev_archdata archdata; struct device_node *of_node; /* associated device tree node */ + const struct of_device_id *of_match; /* matching of_device_id from driver */ dev_t devt; /* dev_t, creates the sysfs "dev" */ diff --git a/include/linux/of.h b/include/linux/of.h index 266db1d0baa9..bfc0ed1b0ced 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -108,7 +108,7 @@ extern void of_node_put(struct device_node *node); #endif /* - * OF address retreival & translation + * OF address retrieval & translation */ /* Helper to read a big number; size is in cells (not bytes) */ diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 975d347079d9..8bfe6c1d4365 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -18,10 +18,11 @@ extern void of_device_make_bus_id(struct device *dev); * @drv: the device_driver structure to test * @dev: the device structure to match against */ -static inline int of_driver_match_device(const struct device *dev, +static inline int of_driver_match_device(struct device *dev, const struct device_driver *drv) { - return of_match_device(drv->of_match_table, dev) != NULL; + dev->of_match = of_match_device(drv->of_match_table, dev); + return dev->of_match != NULL; } extern struct platform_device *of_dev_get(struct platform_device *dev); diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index a68716ad38ce..17c7e21c0bd7 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -23,13 +23,7 @@ * of_platform_driver - Legacy of-aware driver for platform devices. * * An of_platform_driver driver is attached to a basic platform_device on - * ether the "platform bus" (platform_bus_type), or the ibm ebus - * (ibmebus_bus_type). - * - * of_platform_driver is being phased out when used with the platform_bus_type, - * and regular platform_drivers should be used instead. When the transition - * is complete, only ibmebus will be using this structure, and the - * platform_driver member of this structure will be removed. + * the ibm ebus (ibmebus_bus_type). */ struct of_platform_driver { @@ -42,26 +36,16 @@ struct of_platform_driver int (*shutdown)(struct platform_device* dev); struct device_driver driver; - struct platform_driver platform_driver; }; #define to_of_platform_driver(drv) \ container_of(drv,struct of_platform_driver, driver) -extern int of_register_driver(struct of_platform_driver *drv, - struct bus_type *bus); -extern void of_unregister_driver(struct of_platform_driver *drv); - /* Platform drivers register/unregister */ -extern int of_register_platform_driver(struct of_platform_driver *drv); -extern void of_unregister_platform_driver(struct of_platform_driver *drv); - extern struct platform_device *of_device_alloc(struct device_node *np, const char *bus_id, struct device *parent); extern struct platform_device *of_find_device_by_node(struct device_node *np); -extern int of_bus_type_init(struct bus_type *bus, const char *name); - #if !defined(CONFIG_SPARC) /* SPARC has its own device registration method */ /* Platform devices and busses creation */ extern struct platform_device *of_platform_device_create(struct device_node *np, |