summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
diff options
context:
space:
mode:
authorJonathan Cameron2011-08-12 18:08:38 +0200
committerGreg Kroah-Hartman2011-08-23 22:31:06 +0200
commitd29f73db791098179af90e6a5b1df41f941b32cd (patch)
treef3ec1496873807ae7f2a6bc7158a782798fe857a /drivers/staging/iio/trigger/iio-trig-bfin-timer.c
parentstaging:iio:imu:adis16400 remove now unused headers. (diff)
downloadkernel-qcow2-linux-d29f73db791098179af90e6a5b1df41f941b32cd.tar.gz
kernel-qcow2-linux-d29f73db791098179af90e6a5b1df41f941b32cd.tar.xz
kernel-qcow2-linux-d29f73db791098179af90e6a5b1df41f941b32cd.zip
staging:iio:triggers introduce iio_trigger_ops to take const bits out of iio_trig_structure.
Right now this results in increased code, but I still think it is worth doing to avoid replication across instances of drivers etc and move as much stuff as possible to constant. Ops structure is optional for the occasional driver that uses none of it (currently only the ad7793). Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/trigger/iio-trig-bfin-timer.c')
-rw-r--r--drivers/staging/iio/trigger/iio-trig-bfin-timer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
index 4f1729565582..243f38f80de1 100644
--- a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
+++ b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
@@ -143,6 +143,10 @@ static int iio_bfin_tmr_get_number(int irq)
return -ENODEV;
}
+static const struct iio_trigger_ops iio_bfin_tmr_trigger_ops = {
+ owner = THIS_MODULE,
+};
+
static int __devinit iio_bfin_tmr_trigger_probe(struct platform_device *pdev)
{
struct bfin_tmr_state *st;
@@ -175,7 +179,7 @@ static int __devinit iio_bfin_tmr_trigger_probe(struct platform_device *pdev)
}
st->trig->private_data = st;
- st->trig->owner = THIS_MODULE;
+ st->trig->ops = &iio_bfin_tmr_trigger_ops;
st->trig->dev.groups = iio_bfin_tmr_trigger_attr_groups;
ret = iio_trigger_register(st->trig);
if (ret)