From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Daniel Scally" <djrscally@gmail.com>,
"Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Andreas Klinger" <ak@it-klinger.de>,
"Marcin Wojtas" <mw@semihalf.com>,
"Russell King" <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Paul Cercueil" <paul@crapouillou.net>,
"Wolfram Sang" <wsa@kernel.org>,
"Akhil R" <akhilrajeev@nvidia.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, netdev@vger.kernel.org,
openbmc@lists.ozlabs.org, linux-gpio@vger.kernel.org,
linux-mips@vger.kernel.org
Subject: [PATCH v4 2/7] iio: mb1232: relax return value check for IRQ get
Date: Tue, 16 May 2023 10:12:41 +0300 [thread overview]
Message-ID: <429804dac3b1ea55dd233d1e2fdf94240e2f2b93.1684220962.git.mazziesaccount@gmail.com> (raw)
In-Reply-To: <cover.1684220962.git.mazziesaccount@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1537 bytes --]
fwnode_irq_get() was changed to not return 0 anymore.
Drop check for return value 0.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
---
The first patch of the series changes the fwnode_irq_get() so this depends
on the first patch of the series and should not be applied alone.
---
drivers/iio/proximity/mb1232.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/proximity/mb1232.c b/drivers/iio/proximity/mb1232.c
index e70cac8240af..2ab3e3fb2bae 100644
--- a/drivers/iio/proximity/mb1232.c
+++ b/drivers/iio/proximity/mb1232.c
@@ -76,7 +76,7 @@ static s16 mb1232_read_distance(struct mb1232_data *data)
goto error_unlock;
}
- if (data->irqnr >= 0) {
+ if (data->irqnr > 0) {
/* it cannot take more than 100 ms */
ret = wait_for_completion_killable_timeout(&data->ranging,
HZ/10);
@@ -212,7 +212,7 @@ static int mb1232_probe(struct i2c_client *client)
init_completion(&data->ranging);
data->irqnr = fwnode_irq_get(dev_fwnode(&client->dev), 0);
- if (data->irqnr <= 0) {
+ if (data->irqnr < 0) {
/* usage of interrupt is optional */
data->irqnr = -1;
} else {
--
2.40.1
--
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND
~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =]
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-05-16 7:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 7:12 [PATCH v4 0/7] fix fwnode_irq_get[_byname()] returnvalue Matti Vaittinen
2023-05-16 7:12 ` [PATCH v4 1/7] drivers: fwnode: fix fwnode_irq_get[_byname]() Matti Vaittinen
2023-05-16 7:12 ` Matti Vaittinen [this message]
2023-05-17 16:47 ` [PATCH v4 2/7] iio: mb1232: relax return value check for IRQ get Andy Shevchenko
2023-05-19 5:00 ` Matti Vaittinen
2023-05-19 5:26 ` Matti Vaittinen
2023-05-16 7:12 ` [PATCH v4 3/7] net-next: " Matti Vaittinen
2023-05-16 7:13 ` [PATCH v4 4/7] pinctrl: wpcm450: elax " Matti Vaittinen
2023-05-16 16:32 ` Jonathan Neuschäfer
2023-05-17 5:41 ` Vaittinen, Matti
2023-05-17 17:03 ` Andy Shevchenko
2023-05-16 7:13 ` [PATCH v4 5/7] pinctrl: ingenic: relax " Matti Vaittinen
2023-05-16 7:49 ` Paul Cercueil
2023-05-16 7:13 ` [PATCH v4 6/7] pinctrl: pistachio: " Matti Vaittinen
2023-05-16 7:14 ` [PATCH v4 7/7] iio: cdc: ad7150: Functional change Matti Vaittinen
2023-05-17 12:43 ` [PATCH v4 0/7] fix fwnode_irq_get[_byname()] returnvalue Linus Walleij
2023-05-17 13:09 ` Matti Vaittinen
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=429804dac3b1ea55dd233d1e2fdf94240e2f2b93.1684220962.git.mazziesaccount@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=ak@it-klinger.de \
--cc=akhilrajeev@nvidia.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=davem@davemloft.net \
--cc=djrscally@gmail.com \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=j.neuschaefer@gmx.net \
--cc=jic23@kernel.org \
--cc=kuba@kernel.org \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mw@semihalf.com \
--cc=netdev@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=pabeni@redhat.com \
--cc=paul@crapouillou.net \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=wsa@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