Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361213
b: refs/heads/master
c: 852afe9
h: refs/heads/master
i:
  361211: 19b9258
v: v3
  • Loading branch information
Denis CIOCCA authored and Jonathan Cameron committed Mar 5, 2013
1 parent e76e47f commit b654254
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a4d729139b4e94f670288a3505657311f95c886
refs/heads/master: 852afe99fc1c2d2b1376e49f128a3b929e811f2d
9 changes: 4 additions & 5 deletions trunk/drivers/iio/common/st_sensors/st_sensors_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static int st_sensors_match_odr(struct st_sensors *sensor,
int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr)
{
int err;
struct st_sensor_odr_avl odr_out;
struct st_sensor_odr_avl odr_out = {0, 0};
struct st_sensor_data *sdata = iio_priv(indio_dev);

err = st_sensors_match_odr(sdata->sensor, odr, &odr_out);
Expand Down Expand Up @@ -114,7 +114,7 @@ static int st_sensors_match_fs(struct st_sensors *sensor,

static int st_sensors_set_fullscale(struct iio_dev *indio_dev, unsigned int fs)
{
int err, i;
int err, i = 0;
struct st_sensor_data *sdata = iio_priv(indio_dev);

err = st_sensors_match_fs(sdata->sensor, fs, &i);
Expand All @@ -139,14 +139,13 @@ static int st_sensors_set_fullscale(struct iio_dev *indio_dev, unsigned int fs)

int st_sensors_set_enable(struct iio_dev *indio_dev, bool enable)
{
bool found;
u8 tmp_value;
int err = -EINVAL;
struct st_sensor_odr_avl odr_out;
bool found = false;
struct st_sensor_odr_avl odr_out = {0, 0};
struct st_sensor_data *sdata = iio_priv(indio_dev);

if (enable) {
found = false;
tmp_value = sdata->sensor->pw.value_on;
if ((sdata->sensor->odr.addr == sdata->sensor->pw.addr) &&
(sdata->sensor->odr.mask == sdata->sensor->pw.mask)) {
Expand Down

0 comments on commit b654254

Please sign in to comment.