linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Chuhong Yuan <hslester96@gmail.com>, linux-iio@vger.kernel.org
Cc: Michael Hennerich <Michael.Hennerich@analog.com>,
	Alexandru Ardelean <alexandru.ardelean@analog.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Paul Cercueil <paul.cercueil@analog.com>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] iio: amplifiers: ad8366: Change devm_gpiod_get() to optional and add the missed check
Date: Wed, 3 Jun 2020 20:00:17 +0200	[thread overview]
Message-ID: <893ced34-306c-b232-06c2-6cf741844b9c@web.de> (raw)

> 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

             reply	other threads:[~2020-06-03 18:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 18:00 Markus Elfring [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-06-03  9:26 [PATCH v3] iio: amplifiers: ad8366: Change devm_gpiod_get() to optional and add the missed check Chuhong Yuan
2020-06-03 10:19 ` Ardelean, Alexandru
2020-06-06 15:12   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=893ced34-306c-b232-06c2-6cf741844b9c@web.de \
    --to=markus.elfring@web.de \
    --cc=Michael.Hennerich@analog.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=hslester96@gmail.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.cercueil@analog.com \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).