Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317192
b: refs/heads/master
c: 1875ffd
h: refs/heads/master
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Greg Kroah-Hartman committed Jun 5, 2012
1 parent 25ef8d8 commit 824d440
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: e4e8b7765867e8f4705bcc18b8930edbe0e4ef3c
refs/heads/master: 1875ffd218ddafd78f0f8e78198c137cef97fd8a
13 changes: 6 additions & 7 deletions trunk/drivers/iio/inkern.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ struct iio_channel *iio_st_channel_get(const char *name,
strcmp(channel_name, c_i->map->consumer_channel) != 0))
continue;
c = c_i;
get_device(&c->indio_dev->dev);
iio_device_get(c->indio_dev);
break;
}
mutex_unlock(&iio_map_list_lock);
Expand All @@ -149,7 +149,7 @@ EXPORT_SYMBOL_GPL(iio_st_channel_get);

void iio_st_channel_release(struct iio_channel *channel)
{
put_device(&channel->indio_dev->dev);
iio_device_put(channel->indio_dev);
kfree(channel);
}
EXPORT_SYMBOL_GPL(iio_st_channel_release);
Expand Down Expand Up @@ -195,10 +195,10 @@ struct iio_channel *iio_st_channel_get_all(const char *name)
c->map->adc_channel_label);
if (chans[mapind].channel == NULL) {
ret = -EINVAL;
put_device(&chans[mapind].indio_dev->dev);
iio_device_put(chans[mapind].indio_dev);
goto error_free_chans;
}
get_device(&chans[mapind].indio_dev->dev);
iio_device_get(chans[mapind].indio_dev);
mapind++;
}
mutex_unlock(&iio_map_list_lock);
Expand All @@ -210,8 +210,7 @@ struct iio_channel *iio_st_channel_get_all(const char *name)

error_free_chans:
for (i = 0; i < nummaps; i++)
if (chans[i].indio_dev)
put_device(&chans[i].indio_dev->dev);
iio_device_put(chans[i].indio_dev);
kfree(chans);
error_ret:
mutex_unlock(&iio_map_list_lock);
Expand All @@ -225,7 +224,7 @@ void iio_st_channel_release_all(struct iio_channel *channels)
struct iio_channel *chan = &channels[0];

while (chan->indio_dev) {
put_device(&chan->indio_dev->dev);
iio_device_put(chan->indio_dev);
chan++;
}
kfree(channels);
Expand Down

0 comments on commit 824d440

Please sign in to comment.