diff options
Diffstat (limited to 'drivers/iio/inkern.c')
-rw-r--r-- | drivers/iio/inkern.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index d55e98fb300e..58d0ffe856b6 100644 --- a/drivers/iio/inkern.c +++ b/drivers/iio/inkern.c | |||
@@ -167,16 +167,18 @@ void iio_channel_release(struct iio_channel *channel) | |||
167 | } | 167 | } |
168 | EXPORT_SYMBOL_GPL(iio_channel_release); | 168 | EXPORT_SYMBOL_GPL(iio_channel_release); |
169 | 169 | ||
170 | struct iio_channel *iio_channel_get_all(const char *name) | 170 | struct iio_channel *iio_channel_get_all(struct device *dev) |
171 | { | 171 | { |
172 | const char *name; | ||
172 | struct iio_channel *chans; | 173 | struct iio_channel *chans; |
173 | struct iio_map_internal *c = NULL; | 174 | struct iio_map_internal *c = NULL; |
174 | int nummaps = 0; | 175 | int nummaps = 0; |
175 | int mapind = 0; | 176 | int mapind = 0; |
176 | int i, ret; | 177 | int i, ret; |
177 | 178 | ||
178 | if (name == NULL) | 179 | if (dev == NULL) |
179 | return ERR_PTR(-EINVAL); | 180 | return ERR_PTR(-EINVAL); |
181 | name = dev_name(dev); | ||
180 | 182 | ||
181 | mutex_lock(&iio_map_list_lock); | 183 | mutex_lock(&iio_map_list_lock); |
182 | /* first count the matching maps */ | 184 | /* first count the matching maps */ |