aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/industrialio-event.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/industrialio-event.c')
-rw-r--r--drivers/iio/industrialio-event.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
index 5fcf50b1ae5a..b49059de5d02 100644
--- a/drivers/iio/industrialio-event.c
+++ b/drivers/iio/industrialio-event.c
@@ -186,7 +186,7 @@ static ssize_t iio_ev_state_store(struct device *dev,
186 const char *buf, 186 const char *buf,
187 size_t len) 187 size_t len)
188{ 188{
189 struct iio_dev *indio_dev = dev_get_drvdata(dev); 189 struct iio_dev *indio_dev = dev_to_iio_dev(dev);
190 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); 190 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
191 int ret; 191 int ret;
192 bool val; 192 bool val;
@@ -205,7 +205,7 @@ static ssize_t iio_ev_state_show(struct device *dev,
205 struct device_attribute *attr, 205 struct device_attribute *attr,
206 char *buf) 206 char *buf)
207{ 207{
208 struct iio_dev *indio_dev = dev_get_drvdata(dev); 208 struct iio_dev *indio_dev = dev_to_iio_dev(dev);
209 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); 209 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
210 int val = indio_dev->info->read_event_config(indio_dev, 210 int val = indio_dev->info->read_event_config(indio_dev,
211 this_attr->address); 211 this_attr->address);
@@ -220,7 +220,7 @@ static ssize_t iio_ev_value_show(struct device *dev,
220 struct device_attribute *attr, 220 struct device_attribute *attr,
221 char *buf) 221 char *buf)
222{ 222{
223 struct iio_dev *indio_dev = dev_get_drvdata(dev); 223 struct iio_dev *indio_dev = dev_to_iio_dev(dev);
224 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); 224 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
225 int val, ret; 225 int val, ret;
226 226
@@ -237,7 +237,7 @@ static ssize_t iio_ev_value_store(struct device *dev,
237 const char *buf, 237 const char *buf,
238 size_t len) 238 size_t len)
239{ 239{
240 struct iio_dev *indio_dev = dev_get_drvdata(dev); 240 struct iio_dev *indio_dev = dev_to_iio_dev(dev);
241 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); 241 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
242 unsigned long val; 242 unsigned long val;
243 int ret; 243 int ret;