mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> CC: Michal Simek <[email protected]> CC: Greg Kroah-Hartman <[email protected]> CC: Benjamin Herrenschmidt <[email protected]> CC: "David S. Miller" <[email protected]> CC: Stephen Rothwell <[email protected]> CC: Jeremy Kerr <[email protected]> CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected]
This commit is contained in:
parent
efb2e014fc
commit
d706c1b050
11 changed files with 16 additions and 2 deletions
|
|
@ -80,6 +80,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
|
|||
* can be looked up later */
|
||||
of_node_get(child);
|
||||
dev_archdata_set_node(&phy->dev.archdata, child);
|
||||
phy->dev.of_node = child;
|
||||
|
||||
/* All data is now stored in the phy struct; register it */
|
||||
rc = phy_device_register(phy);
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)
|
|||
|
||||
/* Store a pointer to the node in the device structure */
|
||||
of_node_get(nc);
|
||||
spi->dev.of_node = nc;
|
||||
spi->dev.archdata.of_node = nc;
|
||||
|
||||
/* Register the new device */
|
||||
|
|
|
|||
Loading…
Reference in a new issue