diff mbox

[1/4] staging:iio:ad2s1210: Remove end of line with '['

Message ID b87fdd8b09ebee3fd29a8b65257e37eff7d8532b.1520638889.git.rodrigosiqueiramelo@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rodrigo Siqueira March 9, 2018, 11:45 p.m. UTC
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>
---
 drivers/staging/iio/resolver/ad2s1210.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Jonathan Cameron March 10, 2018, 4:41 p.m. UTC | #1
On Fri, 9 Mar 2018 20:45:50 -0300
Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> wrote:

> 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>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan

> ---
>  drivers/staging/iio/resolver/ad2s1210.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
> index f8baab061eba..0cdcd71e285b 100644
> --- a/drivers/staging/iio/resolver/ad2s1210.c
> +++ b/drivers/staging/iio/resolver/ad2s1210.c
> @@ -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] = {

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
index f8baab061eba..0cdcd71e285b 100644
--- a/drivers/staging/iio/resolver/ad2s1210.c
+++ b/drivers/staging/iio/resolver/ad2s1210.c
@@ -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] = {