diff options
| author | Mark Brown <broonie@kernel.org> | 2019-05-20 11:53:50 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2019-05-20 11:53:50 +0100 |
| commit | 1c7c3237c0cc4ad3c7b0df458290c8e2a652f178 (patch) | |
| tree | d5d027d4dbdae390c736a82e16c57966214e2c0a /include/linux/device.h | |
| parent | bfa8130f50a63563eae10ef933fe01b50b3e87a0 (diff) | |
| parent | a188339ca5a396acc588e5851ed7e19f66b0ebd9 (diff) | |
| download | lwn-1c7c3237c0cc4ad3c7b0df458290c8e2a652f178.tar.gz lwn-1c7c3237c0cc4ad3c7b0df458290c8e2a652f178.zip | |
Merge tag 'v5.2-rc1' into asoc-5.3
Linux 5.2-rc1
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 4e6987e11f68..e85264fb6616 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -976,18 +976,14 @@ struct dev_links_info { * a higher-level representation of the device. */ struct device { + struct kobject kobj; struct device *parent; struct device_private *p; - struct kobject kobj; const char *init_name; /* initial name of the device */ const struct device_type *type; - struct mutex mutex; /* mutex to synchronize calls to - * its driver. - */ - struct bus_type *bus; /* type of bus device is on */ struct device_driver *driver; /* which driver has allocated this device */ @@ -995,6 +991,10 @@ struct device { core doesn't touch it */ void *driver_data; /* Driver data, set and get with dev_set_drvdata/dev_get_drvdata */ + struct mutex mutex; /* mutex to synchronize calls to + * its driver. + */ + struct dev_links_info links; struct dev_pm_info power; struct dev_pm_domain *pm_domain; @@ -1009,9 +1009,6 @@ struct device { struct list_head msi_list; #endif -#ifdef CONFIG_NUMA - int numa_node; /* NUMA node this device is close to */ -#endif const struct dma_map_ops *dma_ops; u64 *dma_mask; /* dma mask (if dma'able device) */ u64 coherent_dma_mask;/* Like dma_mask, but for @@ -1040,6 +1037,9 @@ struct device { struct device_node *of_node; /* associated device tree node */ struct fwnode_handle *fwnode; /* firmware device node */ +#ifdef CONFIG_NUMA + int numa_node; /* NUMA node this device is close to */ +#endif dev_t devt; /* dev_t, creates the sysfs "dev" */ u32 id; /* device instance */ @@ -1229,7 +1229,7 @@ static inline void device_lock_assert(struct device *dev) static inline struct device_node *dev_of_node(struct device *dev) { - if (!IS_ENABLED(CONFIG_OF)) + if (!IS_ENABLED(CONFIG_OF) || !dev) return NULL; return dev->of_node; } |
