aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/industrialio-trigger.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-04-26 07:35:01 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-29 21:23:49 -0400
commit7cbb753701d11f3c71e8543e1ae0fc0772edac06 (patch)
tree53954c72751f1842d8565aff3a1ca1b71826603a /drivers/iio/industrialio-trigger.c
parent5d4a6789d5957a6388ea86c811d7c09bbe5f8ebd (diff)
staging:iio: Streamline API function naming
Currently we use two different naming schemes in the IIO API, iio_verb_object and iio_object_verb. E.g iio_device_register and iio_allocate_device. This patches renames instances of the later to the former. The patch also renames allocate to alloc as this seems to be the preferred form throughout the kernel. In particular the following renames are performed by the patch: iio_put_device -> iio_device_put iio_allocate_device -> iio_device_alloc iio_free_device -> iio_device_free iio_get_trigger -> iio_trigger_get iio_put_trigger -> iio_trigger_put iio_allocate_trigger -> iio_trigger_alloc iio_free_trigger -> iio_trigger_free The conversion was done with the following coccinelle patch with manual fixes to comments and documentation. <smpl> @@ @@ -iio_put_device +iio_device_put @@ @@ -iio_allocate_device +iio_device_alloc @@ @@ -iio_free_device +iio_device_free @@ @@ -iio_get_trigger +iio_trigger_get @@ @@ -iio_put_trigger +iio_trigger_put @@ @@ -iio_allocate_trigger +iio_trigger_alloc @@ @@ -iio_free_trigger +iio_trigger_free </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/industrialio-trigger.c')
-rw-r--r--drivers/iio/industrialio-trigger.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
index 03fee2e097ca..1dbd7b86a694 100644
--- a/drivers/iio/industrialio-trigger.c
+++ b/drivers/iio/industrialio-trigger.c
@@ -360,9 +360,9 @@ static ssize_t iio_trigger_write_current(struct device *dev,
360 indio_dev->trig = trig; 360 indio_dev->trig = trig;
361 361
362 if (oldtrig && indio_dev->trig != oldtrig) 362 if (oldtrig && indio_dev->trig != oldtrig)
363 iio_put_trigger(oldtrig); 363 iio_trigger_put(oldtrig);
364 if (indio_dev->trig) 364 if (indio_dev->trig)
365 iio_get_trigger(indio_dev->trig); 365 iio_trigger_get(indio_dev->trig);
366 366
367 return len; 367 return len;
368} 368}
@@ -426,7 +426,7 @@ static void iio_trig_subirqunmask(struct irq_data *d)
426 trig->subirqs[d->irq - trig->subirq_base].enabled = true; 426 trig->subirqs[d->irq - trig->subirq_base].enabled = true;
427} 427}
428 428
429struct iio_trigger *iio_allocate_trigger(const char *fmt, ...) 429struct iio_trigger *iio_trigger_alloc(const char *fmt, ...)
430{ 430{
431 va_list vargs; 431 va_list vargs;
432 struct iio_trigger *trig; 432 struct iio_trigger *trig;
@@ -472,14 +472,14 @@ struct iio_trigger *iio_allocate_trigger(const char *fmt, ...)
472 } 472 }
473 return trig; 473 return trig;
474} 474}
475EXPORT_SYMBOL(iio_allocate_trigger); 475EXPORT_SYMBOL(iio_trigger_alloc);
476 476
477void iio_free_trigger(struct iio_trigger *trig) 477void iio_trigger_free(struct iio_trigger *trig)
478{ 478{
479 if (trig) 479 if (trig)
480 put_device(&trig->dev); 480 put_device(&trig->dev);
481} 481}
482EXPORT_SYMBOL(iio_free_trigger); 482EXPORT_SYMBOL(iio_trigger_free);
483 483
484void iio_device_register_trigger_consumer(struct iio_dev *indio_dev) 484void iio_device_register_trigger_consumer(struct iio_dev *indio_dev)
485{ 485{
@@ -491,7 +491,7 @@ void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev)
491{ 491{
492 /* Clean up and associated but not attached triggers references */ 492 /* Clean up and associated but not attached triggers references */
493 if (indio_dev->trig) 493 if (indio_dev->trig)
494 iio_put_trigger(indio_dev->trig); 494 iio_trigger_put(indio_dev->trig);
495} 495}
496 496
497int iio_triggered_buffer_postenable(struct iio_dev *indio_dev) 497int iio_triggered_buffer_postenable(struct iio_dev *indio_dev)