aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/meter/ade7854-i2c.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-04-26 13:35:01 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-29 21:23:49 -0400
commit7cbb753701d11f3c71e8543e1ae0fc0772edac06 (patch)
tree53954c72751f1842d8565aff3a1ca1b71826603a /drivers/staging/iio/meter/ade7854-i2c.c
parentstaging: iio: lpc32xx-adc: Remove driver conflict due to device tree (diff)
downloadlinux-dev-7cbb753701d11f3c71e8543e1ae0fc0772edac06.tar.xz
linux-dev-7cbb753701d11f3c71e8543e1ae0fc0772edac06.zip
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/meter/ade7854-i2c.c')
-rw-r--r--drivers/staging/iio/meter/ade7854-i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/meter/ade7854-i2c.c b/drivers/staging/iio/meter/ade7854-i2c.c
index c87c86b095e0..527aa97c74ae 100644
--- a/drivers/staging/iio/meter/ade7854-i2c.c
+++ b/drivers/staging/iio/meter/ade7854-i2c.c
@@ -208,7 +208,7 @@ static int __devinit ade7854_i2c_probe(struct i2c_client *client,
struct ade7854_state *st;
struct iio_dev *indio_dev;
- indio_dev = iio_allocate_device(sizeof(*st));
+ indio_dev = iio_device_alloc(sizeof(*st));
if (indio_dev == NULL)
return -ENOMEM;
st = iio_priv(indio_dev);
@@ -226,7 +226,7 @@ static int __devinit ade7854_i2c_probe(struct i2c_client *client,
ret = ade7854_probe(indio_dev, &client->dev);
if (ret)
- iio_free_device(indio_dev);
+ iio_device_free(indio_dev);
return ret;
}