summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKsenija Stanojevic <ksenija.stanojevic@gmail.com>2015-10-27 16:07:54 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-29 07:55:17 +0900
commit4c3577db3e4f2a7f516462e7ef2b4fb1f09ffd8c (patch)
tree619359cbe149b2bd747ec0c2beb6d314c12a87ca /drivers
parent832bf28ce436c97c224ad88e304d76f1f96b7a99 (diff)
Staging: iio: impedance-analyzer: Fix sparse warning
Fix following sparse endian warning: drivers/staging/iio/impedance-analyzer/ad5933.c:671:34: warning: cast to restricted __be16 drivers/staging/iio/impedance-analyzer/ad5933.c:671:34: warning: cast to restricted __be16 drivers/staging/iio/impedance-analyzer/ad5933.c:671:34: warning: cast to restricted __be16 drivers/staging/iio/impedance-analyzer/ad5933.c:671:34: warning: cast to restricted __be16 drivers/staging/iio/impedance-analyzer/ad5933.c:672:34: warning: cast to restricted __be16 drivers/staging/iio/impedance-analyzer/ad5933.c:672:34: warning: cast to restricted __be16 drivers/staging/iio/impedance-analyzer/ad5933.c:672:34: warning: cast to restricted __be16 drivers/staging/iio/impedance-analyzer/ad5933.c:672:34: warning: cast to restricted __be16 drivers/staging/iio/impedance-analyzer/ad5933.c:674:34: warning: cast to restricted __be16 drivers/staging/iio/impedance-analyzer/ad5933.c:674:34: warning: cast to restricted __be16 drivers/staging/iio/impedance-analyzer/ad5933.c:674:34: warning: cast to restricted __be16 drivers/staging/iio/impedance-analyzer/ad5933.c:674:34: warning: cast to restricted __be16 Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/iio/impedance-analyzer/ad5933.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
index c18109c55497..10c43dda0f5a 100644
--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
+++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
@@ -644,7 +644,8 @@ static void ad5933_work(struct work_struct *work)
struct ad5933_state *st = container_of(work,
struct ad5933_state, work.work);
struct iio_dev *indio_dev = i2c_get_clientdata(st->client);
- signed short buf[2];
+ __be16 buf[2];
+ int val[2];
unsigned char status;
mutex_lock(&indio_dev->mlock);
@@ -668,12 +669,12 @@ static void ad5933_work(struct work_struct *work)
scan_count * 2, (u8 *)buf);
if (scan_count == 2) {
- buf[0] = be16_to_cpu(buf[0]);
- buf[1] = be16_to_cpu(buf[1]);
+ val[0] = be16_to_cpu(buf[0]);
+ val[1] = be16_to_cpu(buf[1]);
} else {
- buf[0] = be16_to_cpu(buf[0]);
+ val[0] = be16_to_cpu(buf[0]);
}
- iio_push_to_buffers(indio_dev, buf);
+ iio_push_to_buffers(indio_dev, val);
} else {
/* no data available - try again later */
schedule_delayed_work(&st->work, st->poll_time_jiffies);