From: Hartmut Knaack <knaack.h@gmx.de>
To: IIO <linux-iio@vger.kernel.org>
Cc: David Barksdale <dbarksdale@uplogix.com>
Subject: [PATCH]iio:humidity:si7020: fix pointer to i2c client
Date: Sat, 25 Oct 2014 20:09:06 +0200 [thread overview]
Message-ID: <544BE742.8030004@gmx.de> (raw)
In si7020_read_raw() the pointer to the i2c client was obtained as second level
pointer, although a simple pointer is appropriate.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
---
diff --git a/drivers/iio/humidity/si7020.c b/drivers/iio/humidity/si7020.c
index e336af7..62d74d3 100644
--- a/drivers/iio/humidity/si7020.c
+++ b/drivers/iio/humidity/si7020.c
@@ -45,12 +45,12 @@ static int si7020_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int *val,
int *val2, long mask)
{
- struct i2c_client **client = iio_priv(indio_dev);
+ struct i2c_client *client = iio_priv(indio_dev);
int ret;
switch (mask) {
case IIO_CHAN_INFO_RAW:
- ret = i2c_smbus_read_word_data(*client,
+ ret = i2c_smbus_read_word_data(client,
chan->type == IIO_TEMP ?
SI7020CMD_TEMP_HOLD :
SI7020CMD_RH_HOLD);
next reply other threads:[~2014-10-25 18:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-25 18:09 Hartmut Knaack [this message]
2014-10-25 19:40 ` [PATCH]iio:humidity:si7020: fix pointer to i2c client 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=544BE742.8030004@gmx.de \
--to=knaack.h@gmx.de \
--cc=dbarksdale@uplogix.com \
--cc=linux-iio@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.