aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/accel/adis16201_core.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/staging/iio/accel/adis16201_core.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/staging/iio/accel/adis16201_core.c')
-rw-r--r--drivers/staging/iio/accel/adis16201_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/iio/accel/adis16201_core.c b/drivers/staging/iio/accel/adis16201_core.c
index 9dce7b8d38a..62667803c5a 100644
--- a/drivers/staging/iio/accel/adis16201_core.c
+++ b/drivers/staging/iio/accel/adis16201_core.c
@@ -532,7 +532,7 @@ static int __devinit adis16201_probe(struct spi_device *spi)
532 struct iio_dev *indio_dev; 532 struct iio_dev *indio_dev;
533 533
534 /* setup the industrialio driver allocated elements */ 534 /* setup the industrialio driver allocated elements */
535 indio_dev = iio_allocate_device(sizeof(*st)); 535 indio_dev = iio_device_alloc(sizeof(*st));
536 if (indio_dev == NULL) { 536 if (indio_dev == NULL) {
537 ret = -ENOMEM; 537 ret = -ENOMEM;
538 goto error_ret; 538 goto error_ret;
@@ -587,7 +587,7 @@ error_uninitialize_ring:
587error_unreg_ring_funcs: 587error_unreg_ring_funcs:
588 adis16201_unconfigure_ring(indio_dev); 588 adis16201_unconfigure_ring(indio_dev);
589error_free_dev: 589error_free_dev:
590 iio_free_device(indio_dev); 590 iio_device_free(indio_dev);
591error_ret: 591error_ret:
592 return ret; 592 return ret;
593} 593}
@@ -600,7 +600,7 @@ static int adis16201_remove(struct spi_device *spi)
600 adis16201_remove_trigger(indio_dev); 600 adis16201_remove_trigger(indio_dev);
601 iio_buffer_unregister(indio_dev); 601 iio_buffer_unregister(indio_dev);
602 adis16201_unconfigure_ring(indio_dev); 602 adis16201_unconfigure_ring(indio_dev);
603 iio_free_device(indio_dev); 603 iio_device_free(indio_dev);
604 604
605 return 0; 605 return 0;
606} 606}