auxdisplay: Convert list_for_each to entry variant
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 25 Apr 2017 16:13:34 +0000 (16:13 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 16:24:03 +0000 (18:24 +0200)
convert list_for_each() to list_for_each_entry() where
applicable.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/auxdisplay/panel.c

index e0c014c2356ffb149f87d6b7b923ba98bdf9fb91..7a8b8fb2f572c49e99932d9d260ab2e3858fbbe1 100644 (file)
@@ -1345,14 +1345,11 @@ static inline void input_state_falling(struct logical_input *input)
 
 static void panel_process_inputs(void)
 {
-       struct list_head *item;
        struct logical_input *input;
 
        keypressed = 0;
        inputs_stable = 1;
-       list_for_each(item, &logical_inputs) {
-               input = list_entry(item, struct logical_input, list);
-
+       list_for_each_entry(input, &logical_inputs, list) {
                switch (input->state) {
                case INPUT_ST_LOW:
                        if ((phys_curr & input->mask) != input->value)