OSDN Git Service

staging:iio:ad2s1210: Remove end of line with '['
authorRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Fri, 9 Mar 2018 23:45:50 +0000 (20:45 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 10 Mar 2018 16:41:09 +0000 (16:41 +0000)
This patch fixes the checkpatch.pl check:

iio/resolver/ad2s1210.c:202: CHECK: Lines should not end with a '['

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/resolver/ad2s1210.c

index f8baab0..0cdcd71 100644 (file)
@@ -165,9 +165,10 @@ int ad2s1210_update_frequency_control_word(struct ad2s1210_state *st)
 
 static unsigned char ad2s1210_read_resolution_pin(struct ad2s1210_state *st)
 {
-       return ad2s1210_resolution_value[
-               (gpio_get_value(st->pdata->res[0]) << 1) |
-               gpio_get_value(st->pdata->res[1])];
+       int resolution = (gpio_get_value(st->pdata->res[0]) << 1) |
+                         gpio_get_value(st->pdata->res[1]);
+
+       return ad2s1210_resolution_value[resolution];
 }
 
 static const int ad2s1210_res_pins[4][2] = {