diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2010-09-04 16:54:48 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-05 04:19:01 (GMT) |
commit | 9dbfb6f14a85ef4af5c0a8a49a5ff57591171ad1 (patch) | |
tree | 01f9f434d2fa8297c713660971a202a7337f6a2e /drivers/staging/iio/trigger | |
parent | 2d7770a9425b44ca487865de24587e420208d741 (diff) | |
download | linux-fsl-qoriq-9dbfb6f14a85ef4af5c0a8a49a5ff57591171ad1.tar.xz |
staging: iio: Make use of the convenient IIO_TRIGGER_NAME_ATTR macro
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/trigger')
-rw-r--r-- | drivers/staging/iio/trigger/iio-trig-gpio.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/trigger/iio-trig-periodic-rtc.c | 12 |
2 files changed, 2 insertions, 12 deletions
diff --git a/drivers/staging/iio/trigger/iio-trig-gpio.c b/drivers/staging/iio/trigger/iio-trig-gpio.c index f93cc91..2ce95e9 100644 --- a/drivers/staging/iio/trigger/iio-trig-gpio.c +++ b/drivers/staging/iio/trigger/iio-trig-gpio.c @@ -47,7 +47,7 @@ static irqreturn_t iio_gpio_trigger_poll(int irq, void *private) 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, diff --git a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c index b0b52f8..24f174e 100644 --- a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c +++ b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c @@ -72,17 +72,7 @@ error_ret: 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); |