diff options
author | Hartmut Knaack <knaack.h@gmx.de> | 2015-07-30 00:39:38 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-08-08 14:22:51 +0300 |
commit | 7d73e02c5d11ac1298b0a363b57d713969c02bbd (patch) | |
tree | 4a05cfa5096b288715c9eb36b199d8fb261d9458 /drivers/iio | |
parent | 03ecd50c50450b3e3173c9dda8adab241b46ae1e (diff) | |
download | linux-7d73e02c5d11ac1298b0a363b57d713969c02bbd.tar.xz |
iio:accel:stk8312: use appropriate variable types
Adapt some variable types to reduce unnecessary casting.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/accel/stk8312.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/accel/stk8312.c b/drivers/iio/accel/stk8312.c index d406ad05b8e5..4a697446f196 100644 --- a/drivers/iio/accel/stk8312.c +++ b/drivers/iio/accel/stk8312.c @@ -69,8 +69,8 @@ static const int stk8312_scale_table[][2] = { }; static const struct { - u16 val; - u32 val2; + int val; + int val2; } stk8312_samp_freq_table[] = { {400, 0}, {200, 0}, {100, 0}, {50, 0}, {25, 0}, {12, 500000}, {6, 250000}, {3, 125000} @@ -103,7 +103,7 @@ static const struct iio_chan_spec stk8312_channels[] = { struct stk8312_data { struct i2c_client *client; struct mutex lock; - int range; + u8 range; u8 sample_rate_idx; u8 mode; struct iio_trigger *dready_trig; @@ -243,7 +243,7 @@ static const struct iio_trigger_ops stk8312_trigger_ops = { .owner = THIS_MODULE, }; -static int stk8312_set_sample_rate(struct stk8312_data *data, int rate) +static int stk8312_set_sample_rate(struct stk8312_data *data, u8 rate) { int ret; u8 masked_reg; |