From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Sascha Hauer <kernel@pengutronix.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-iio <linux-iio@vger.kernel.org>,
devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCH v1 3/3] iio: adc: tsc2046: silent spi_device_id warning
Date: Tue, 30 Aug 2022 23:02:08 +0300 [thread overview]
Message-ID: <CAHp75Vc-NNZfSaM8wwf+558aHKU9ZL0Fp3aJEop475mHTExKjw@mail.gmail.com> (raw)
In-Reply-To: <20220830110709.2037302-3-o.rempel@pengutronix.de>
On Tue, Aug 30, 2022 at 2:19 PM Oleksij Rempel <o.rempel@pengutronix.de> wrote:
>
> Add spi_device_id to silent following warning:
> SPI driver tsc2046 has no spi_device_id for ti,tsc2046e-adc
Missed period.
...
> - dcfg = device_get_match_data(dev);
Why remove this and duplicate the check below with the inverted conditional?
> + if (!dev_fwnode(dev)) {
> + const struct spi_device_id *id;
> +
> + id = spi_get_device_id(spi);
> + dcfg = (const struct tsc2046_adc_dcfg *)id->driver_data;
> + } else {
> + dcfg = device_get_match_data(dev);
> + }
if (!dcfg) {
...try SPI ID...
}
if (!dfg)
return -E...
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-08-30 20:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 11:07 [PATCH v1 1/3] dt-bindings: iio: adc: ti,tsc2046: add vref-supply property Oleksij Rempel
2022-08-30 11:07 ` [PATCH v1 2/3] iio: adc: tsc2046: add vref support Oleksij Rempel
2022-08-30 11:07 ` [PATCH v1 3/3] iio: adc: tsc2046: silent spi_device_id warning Oleksij Rempel
2022-08-30 13:02 ` Jonathan Cameron
2022-08-30 16:07 ` Oleksij Rempel
2022-08-30 20:02 ` Andy Shevchenko [this message]
2022-08-30 14:31 ` [PATCH v1 1/3] dt-bindings: iio: adc: ti,tsc2046: add vref-supply property Krzysztof Kozlowski
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=CAHp75Vc-NNZfSaM8wwf+558aHKU9ZL0Fp3aJEop475mHTExKjw@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=robh+dt@kernel.org \
/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).