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
This commit is contained in:
@@ -34,6 +34,7 @@ struct class;
|
||||
struct class_private;
|
||||
struct bus_type;
|
||||
struct bus_type_private;
|
||||
struct device_node;
|
||||
|
||||
struct bus_attribute {
|
||||
struct attribute attr;
|
||||
@@ -433,6 +434,9 @@ struct device {
|
||||
override */
|
||||
/* arch specific additions */
|
||||
struct dev_archdata archdata;
|
||||
#ifdef CONFIG_OF
|
||||
struct device_node *of_node;
|
||||
#endif
|
||||
|
||||
dev_t devt; /* dev_t, creates the sysfs "dev" */
|
||||
|
||||
|
Reference in New Issue
Block a user