[PATCH v2 3/5] iio: sx9310: whoami is unsigned

From: Stephen Boyd
Date: Fri Jul 24 2020 - 17:33:47 EST


This is an unsigned value, actually it's a u8 but regmap doesn't handle
that easily. Let's make it unsigned throughout so that we don't need to
worry about signed vs. unsigned comparison behavior.

Cc: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
Cc: Daniel Campello <campello@xxxxxxxxxxxx>
Cc: Hartmut Knaack <knaack.h@xxxxxx>
Cc: Lars-Peter Clausen <lars@xxxxxxxxxx>
Cc: Peter Meerwald-Stadler <pmeerw@xxxxxxxxxx>
Cc: Douglas Anderson <dianders@xxxxxxxxxxxx>
Fixes: 72ad02b15d63 ("iio: Add SEMTECH SX9310/9311 sensor driver")
Signed-off-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
---
drivers/iio/proximity/sx9310.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/proximity/sx9310.c b/drivers/iio/proximity/sx9310.c
index 84c3c9ae80dc..fca871ad82ba 100644
--- a/drivers/iio/proximity/sx9310.c
+++ b/drivers/iio/proximity/sx9310.c
@@ -144,7 +144,7 @@ struct sx9310_data {
struct completion completion;
unsigned int chan_read, chan_event;
int channel_users[SX9310_NUM_CHANNELS];
- int whoami;
+ unsigned int whoami;
};

static const struct iio_event_spec sx9310_events[] = {
@@ -864,7 +864,8 @@ static int sx9310_init_device(struct iio_dev *indio_dev)

static int sx9310_set_indio_dev_name(struct device *dev,
struct iio_dev *indio_dev,
- const struct i2c_device_id *id, int whoami)
+ const struct i2c_device_id *id,
+ unsigned int whoami)
{
const struct acpi_device_id *acpi_id;

--
Sent by a computer, using git, on the internet