return 0;
}
-static ssize_t iio_bfin_tmr_frequency_store(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t count)
+static ssize_t frequency_store(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
{
struct iio_trigger *trig = to_iio_trigger(dev);
struct bfin_tmr_state *st = iio_trigger_get_drvdata(trig);
return count;
}
-static ssize_t iio_bfin_tmr_frequency_show(struct device *dev,
- struct device_attribute *attr,
- char *buf)
+static ssize_t frequency_show(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
{
struct iio_trigger *trig = to_iio_trigger(dev);
struct bfin_tmr_state *st = iio_trigger_get_drvdata(trig);
return sprintf(buf, "%lu\n", val);
}
-static DEVICE_ATTR(frequency, 0644, iio_bfin_tmr_frequency_show,
- iio_bfin_tmr_frequency_store);
+static DEVICE_ATTR_RW(frequency);
static struct attribute *iio_bfin_tmr_trigger_attrs[] = {
&dev_attr_frequency.attr,