Skip to content

Commit

Permalink
HID: intel_ish-hid: Convert list_for_each to entry variant
Browse files Browse the repository at this point in the history
convert list_for_each() to list_for_each_entry() where
applicable.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Wei Yongjun authored and Jiri Kosina committed Aug 29, 2016
1 parent 37becf6 commit e8c6113
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/hid/intel-ish-hid/ishtp/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,9 @@ static struct ishtp_cl_device *ishtp_bus_add_device(struct ishtp_device *dev,
struct ishtp_cl_device *device;
int status;
unsigned long flags;
struct list_head *pos;

spin_lock_irqsave(&dev->device_list_lock, flags);
list_for_each(pos, &dev->device_list) {
device = list_entry(pos, struct ishtp_cl_device, device_link);
list_for_each_entry(device, &dev->device_list, device_link) {
if (!strcmp(name, dev_name(&device->dev))) {
device->fw_client = &dev->fw_clients[
dev->fw_client_presentation_num - 1];
Expand Down

0 comments on commit e8c6113

Please sign in to comment.