Re: [PATCH v3] iio: amplifiers: ad8366: Change devm_gpiod_get() to optional and add the missed check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Since if there is no GPIO, nothing happens, replace devm_gpiod_get()
> with devm_gpiod_get_optional().

…
> +++ b/drivers/iio/amplifiers/ad8366.c
> @@ -262,8 +262,12 @@  static int ad8366_probe(struct spi_device *spi)
…
>  	case ID_HMC1119:
> -		st->reset_gpio = devm_gpiod_get(&spi->dev, "reset",
> +		st->reset_gpio = devm_gpiod_get_optional(&spi->dev, "reset",
>  			GPIOD_OUT_HIGH);
…

I suggest to choose an other source code formatting for this statement.

A)
+		st->reset_gpio = devm_gpiod_get_optional(&spi->dev, "reset",
+							 GPIOD_OUT_HIGH);

B)
+		st->reset_gpio = devm_gpiod_get_optional(&spi->dev, "reset", GPIOD_OUT_HIGH);
-			GPIOD_OUT_HIGH);


Regards,
Markus




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux