IIO_EVENT_SH(data_rdy_trig, &adis16209_data_rdy_trig_poll);
-static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
+static IIO_TRIGGER_NAME_ATTR;
static struct attribute *adis16209_trigger_attrs[] = {
&dev_attr_name.attr,
IIO_EVENT_SH(data_rdy_trig, &adis16240_data_rdy_trig_poll);
-static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
+static IIO_TRIGGER_NAME_ATTR;
static struct attribute *adis16240_trigger_attrs[] = {
&dev_attr_name.attr,
&t);
return ret;
}
-static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
+
+static IIO_TRIGGER_NAME_ATTR;
static struct attribute *lis3l02dq_trigger_attrs[] = {
&dev_attr_name.attr,
IIO_EVENT_SH(data_rdy_trig, &adis16260_data_rdy_trig_poll);
-static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
+static IIO_TRIGGER_NAME_ATTR;
static struct attribute *adis16260_trigger_attrs[] = {
&dev_attr_name.attr,
IIO_EVENT_SH(data_rdy_trig, &adis16300_data_rdy_trig_poll);
-static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
+static IIO_TRIGGER_NAME_ATTR;
static struct attribute *adis16300_trigger_attrs[] = {
&dev_attr_name.attr,
IIO_EVENT_SH(data_rdy_trig, &adis16350_data_rdy_trig_poll);
-static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
+static IIO_TRIGGER_NAME_ATTR;
static struct attribute *adis16350_trigger_attrs[] = {
&dev_attr_name.attr,
IIO_EVENT_SH(data_rdy_trig, &adis16400_data_rdy_trig_poll);
-static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
+static IIO_TRIGGER_NAME_ATTR;
static struct attribute *adis16400_trigger_attrs[] = {
&dev_attr_name.attr,
return IRQ_HANDLED;
}
-static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
+static IIO_TRIGGER_NAME_ATTR;
static struct attribute *iio_gpio_trigger_attrs[] = {
&dev_attr_name.attr,
return ret;
}
-static ssize_t iio_trig_periodic_read_name(struct device *dev,
- struct device_attribute *attr,
- char *buf)
-{
- struct iio_trigger *trig = dev_get_drvdata(dev);
- return sprintf(buf, "%s\n", trig->name);
-}
-
-static DEVICE_ATTR(name, S_IRUGO,
- iio_trig_periodic_read_name,
- NULL);
+static IIO_TRIGGER_NAME_ATTR;
static DEVICE_ATTR(frequency, S_IRUGO | S_IWUSR,
iio_trig_periodic_read_freq,
iio_trig_periodic_write_freq);