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>
This commit is contained in:
parent
927f82875c
commit
a3a87d66d3
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user