diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:12:28 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-04-28 20:20:57 -0400 |
commit | d706c1b050274b3bf97d7cb0542c0d070c9ccb8b (patch) | |
tree | 9104c28f9028589cc4b95d8846dfc3288dcbf289 /include | |
parent | efb2e014fc4f2675011b802e1a84bf9a58756004 (diff) |
driver-core: Add device node pointer to struct device
Currently, platforms using CONFIG_OF add a 'struct device_node *of_node'
to dev->archdata. However, with CONFIG_OF becoming generic for all
architectures, it makes sense for commonality to move it out of archdata
and into struct device proper.
This patch adds a struct device_node *of_node member to struct device
and updates all locations which currently write the device_node pointer
into archdata to also update dev->of_node. Subsequent patches will
modify callers to use the archdata location and ultimately remove
the archdata member entirely.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
CC: Michal Simek <monstr@monstr.eu>
CC: Greg Kroah-Hartman <gregkh@suse.de>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: "David S. Miller" <davem@davemloft.net>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
CC: Jeremy Kerr <jeremy.kerr@canonical.com>
CC: microblaze-uclinux@itee.uq.edu.au
CC: linux-kernel@vger.kernel.org
CC: linuxppc-dev@ozlabs.org
CC: sparclinux@vger.kernel.org
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/device.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 182192892d45..7a968bdb02e2 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -34,6 +34,7 @@ struct class; | |||
34 | struct class_private; | 34 | struct class_private; |
35 | struct bus_type; | 35 | struct bus_type; |
36 | struct bus_type_private; | 36 | struct bus_type_private; |
37 | struct device_node; | ||
37 | 38 | ||
38 | struct bus_attribute { | 39 | struct bus_attribute { |
39 | struct attribute attr; | 40 | struct attribute attr; |
@@ -433,6 +434,9 @@ struct device { | |||
433 | override */ | 434 | override */ |
434 | /* arch specific additions */ | 435 | /* arch specific additions */ |
435 | struct dev_archdata archdata; | 436 | struct dev_archdata archdata; |
437 | #ifdef CONFIG_OF | ||
438 | struct device_node *of_node; | ||
439 | #endif | ||
436 | 440 | ||
437 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 441 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
438 | 442 | ||