summaryrefslogtreecommitdiffstats
path: root/drivers/base/base.h
diff options
context:
space:
mode:
authorWei Yang <richardw.yang@linux.intel.com>2019-01-18 10:34:59 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-18 16:55:48 +0100
commit570d0200123fb4f809aa2f6226e93a458d664d70 (patch)
tree7da09bb196cd7cd3dcc845f9ed96466fa3a15eeb /drivers/base/base.h
parent4bd4e92cfe6d2af77938c2a8ac6635c363dc0ac2 (diff)
downloadlinux-570d0200123fb4f809aa2f6226e93a458d664d70.tar.bz2
driver core: move device->knode_class to device_private
As the description of struct device_private says, it stores data which is private to driver core. And it already has similar fields like: knode_parent, knode_driver, knode_driver and knode_bus. This look it is more proper to put knode_class together with those fields to make it private to driver core. This patch move device->knode_class to device_private to make it comply with code convention. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/base.h')
-rw-r--r--drivers/base/base.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 7a419a7a6235..37329a668935 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -60,6 +60,7 @@ struct driver_private {
* @knode_parent - node in sibling list
* @knode_driver - node in driver list
* @knode_bus - node in bus list
+ * @knode_class - node in class list
* @deferred_probe - entry in deferred_probe_list which is used to retry the
* binding of drivers which were unable to get all the resources needed by
* the device; typically because it depends on another driver getting
@@ -74,6 +75,7 @@ struct device_private {
struct klist_node knode_parent;
struct klist_node knode_driver;
struct klist_node knode_bus;
+ struct klist_node knode_class;
struct list_head deferred_probe;
struct device *device;
};
@@ -83,6 +85,8 @@ struct device_private {
container_of(obj, struct device_private, knode_driver)
#define to_device_private_bus(obj) \
container_of(obj, struct device_private, knode_bus)
+#define to_device_private_class(obj) \
+ container_of(obj, struct device_private, knode_class)
/* initialisation functions */
extern int devices_init(void);