From: Song Qiang <songqiang1304521@gmail.com>
To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de,
pmeerw@pmeerw.net, shubhrajyoti@ti.com
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Song Qiang <songqiang1304521@gmail.com>
Subject: [PATCH] iio: magnetometer: hmc5843: Replace a return value.
Date: Thu, 20 Sep 2018 21:42:19 +0800 [thread overview]
Message-ID: <20180920134219.8402-1-songqiang1304521@gmail.com> (raw)
This error apparently is caused by timed out event, so a -ETIMEDOUT
should be used instead of a -EIO, and it also tells user what happened
, so this dev_err may not be needed anymore.
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
---
I used ./scripts/get_maintainer.pl to get maintainers about this file,
I thought this script searches maintainers with looking up MAINTAINER,
is that right?
So I searched MAINTAINER and also found nothing related to hmc5843.
In the declearation area I can see Shubhrajyoti Datta
<shubhrajyoti@ti.com> wroted this driver and several other people
including Peter Meerwald have contributed. Is this driver now a orphan?
Or if it is, I think we may also need to add it to the MAINTAINER file.
I'm also familiar with this device, I think I can add interrupt support
later.
drivers/iio/magnetometer/hmc5843_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iio/magnetometer/hmc5843_core.c b/drivers/iio/magnetometer/hmc5843_core.c
index ada142fb7aa3..4fb393c3854c 100644
--- a/drivers/iio/magnetometer/hmc5843_core.c
+++ b/drivers/iio/magnetometer/hmc5843_core.c
@@ -170,8 +170,7 @@ static int hmc5843_wait_measurement(struct hmc5843_data *data)
}
if (tries < 0) {
- dev_err(data->dev, "data not ready\n");
- return -EIO;
+ return -ETIMEDOUT;
}
return 0;
--
2.17.1
next reply other threads:[~2018-09-20 13:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-20 13:42 Song Qiang [this message]
2018-09-22 9:28 ` 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=20180920134219.8402-1-songqiang1304521@gmail.com \
--to=songqiang1304521@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=pmeerw@pmeerw.net \
--cc=shubhrajyoti@ti.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
all inboxes | Powered by JetHome®