From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Tomer Maimon <tmaimon77@gmail.com>
Cc: "Avi Fishman" <avifishman70@gmail.com>,
"Tali Perry" <tali.perry1@gmail.com>,
"Joel Stanley" <joel@jms.id.au>,
"Patrick Venture" <venture@google.com>,
"Nancy Yuen" <yuenn@google.com>,
"Benjamin Fair" <benjaminfair@google.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
zhengbin13@huawei.com,
"OpenBMC Maillist" <openbmc@lists.ozlabs.org>,
linux-iio <linux-iio@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCH v1 2/2] iio: adc: npcm: Add NPCM8XX support
Date: Mon, 11 Jul 2022 16:16:08 +0200 [thread overview]
Message-ID: <CAHp75VeCPRVUMHYdNWgPja2eWeStokRDSogW-7ALz10_yEaDMA@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VdXsiH9ityqopznRpjxvwOboS_Zbi9iO6nRZ03TuKxTtg@mail.gmail.com>
On Mon, Jul 11, 2022 at 4:14 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Mon, Jul 11, 2022 at 3:59 PM Tomer Maimon <tmaimon77@gmail.com> wrote:
...
> > struct device *dev = &pdev->dev;
> > + const struct of_device_id *match;
> > + match = of_match_node(npcm_adc_match, pdev->dev.of_node);
> > + if (!match || !match->data) {
> > + dev_err(dev, "Failed getting npcm_adc_data\n");
> > + return -ENODEV;
> > + }
> >
> > + info->data = (struct npcm_adc_info *)match->data;
>
> Instead of above
>
> info->data = device_get_match_data(dev);
> if (!info->data)
> return -ENODEV;
Or
return dev_err_probe(dev, -EINVAL, "...\n");
if you want that message to be issued.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-07-11 14:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 13:43 [PATCH v1 0/2] iio: adc: npcm: add Arbel NPCM8XX support Tomer Maimon
2022-07-11 13:43 ` [PATCH v1 1/2] dt-bindings: iio: adc: npcm: Add npcm845 compatible string Tomer Maimon
2022-07-11 17:55 ` Rob Herring
2022-07-12 8:03 ` Tomer Maimon
2022-07-12 8:15 ` Krzysztof Kozlowski
2022-07-12 8:19 ` Tomer Maimon
2022-07-11 13:43 ` [PATCH v1 2/2] iio: adc: npcm: Add NPCM8XX support Tomer Maimon
2022-07-11 14:14 ` Andy Shevchenko
2022-07-11 14:16 ` Andy Shevchenko [this message]
2022-07-12 7:59 ` Tomer Maimon
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=CAHp75VeCPRVUMHYdNWgPja2eWeStokRDSogW-7ALz10_yEaDMA@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=avifishman70@gmail.com \
--cc=benjaminfair@google.com \
--cc=devicetree@vger.kernel.org \
--cc=j.neuschaefer@gmx.net \
--cc=jic23@kernel.org \
--cc=joel@jms.id.au \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=robh+dt@kernel.org \
--cc=tali.perry1@gmail.com \
--cc=tmaimon77@gmail.com \
--cc=venture@google.com \
--cc=yuenn@google.com \
--cc=zhengbin13@huawei.com \
/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).