diff options
author | Jonathan Cameron <jic23@kernel.org> | 2017-07-23 18:25:43 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2017-08-22 21:03:14 +0200 |
commit | 63b19547cc3d96041d7bc7ab8de6292b0ebaf2c9 (patch) | |
tree | 471c61258a87337a3458077411f8638fe976b3c8 /drivers/iio/industrialio-trigger.c | |
parent | staging: rtlwifi: Reviewers fixes (diff) | |
download | linux-63b19547cc3d96041d7bc7ab8de6292b0ebaf2c9.tar.xz linux-63b19547cc3d96041d7bc7ab8de6292b0ebaf2c9.zip |
iio: Use macro magic to avoid manual assign of driver_module
Starting point in boiler plate reduction similar to that done for
many similar cases elsewhere in the kernel.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Diffstat (limited to 'drivers/iio/industrialio-trigger.c')
-rw-r--r-- | drivers/iio/industrialio-trigger.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c index 4061fed93f1f..9596fedacedb 100644 --- a/drivers/iio/industrialio-trigger.c +++ b/drivers/iio/industrialio-trigger.c @@ -250,7 +250,7 @@ static int iio_trigger_attach_poll_func(struct iio_trigger *trig, = bitmap_empty(trig->pool, CONFIG_IIO_CONSUMERS_PER_TRIGGER); /* Prevent the module from being removed whilst attached to a trigger */ - __module_get(pf->indio_dev->info->driver_module); + __module_get(pf->indio_dev->driver_module); /* Get irq number */ pf->irq = iio_trigger_get_irq(trig); @@ -286,7 +286,7 @@ out_free_irq: out_put_irq: iio_trigger_put_irq(trig, pf->irq); out_put_module: - module_put(pf->indio_dev->info->driver_module); + module_put(pf->indio_dev->driver_module); return ret; } @@ -307,7 +307,7 @@ static int iio_trigger_detach_poll_func(struct iio_trigger *trig, trig->attached_own_device = false; iio_trigger_put_irq(trig, pf->irq); free_irq(pf->irq, pf); - module_put(pf->indio_dev->info->driver_module); + module_put(pf->indio_dev->driver_module); return ret; } |