diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-03-24 15:20:23 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-24 15:33:26 +0300 |
commit | a3a87d66d3f64c74acbc25799d38effb63695ea0 (patch) | |
tree | 7945601773d94633f802853d864c78c95f2b86ab /drivers/base | |
parent | 927f82875c272e8c1159cb2c00bda473402c7c28 (diff) | |
download | linux-a3a87d66d3f64c74acbc25799d38effb63695ea0.tar.xz |
driver core: Replace open-coded list_last_entry()
There is a place in the code where open-coded version of list entry accessors
list_last_entry() is used.
Replace that with the standard macro.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200324122023.9649-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/dd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 3f5b8bdd94f0..06ec0e851fa1 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -1199,7 +1199,7 @@ void driver_detach(struct device_driver *drv) spin_unlock(&drv->p->klist_devices.k_lock); break; } - dev_prv = list_entry(drv->p->klist_devices.k_list.prev, + dev_prv = list_last_entry(&drv->p->klist_devices.k_list, struct device_private, knode_driver.n_node); dev = dev_prv->device; |