All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Popa <stefan.popa@analog.com>
To: <jic23@kernel.org>, <robh+dt@kernel.org>, <mark.rutland@arm.com>
Cc: Stefan Popa <stefan.popa@analog.com>,
	<Michael.Hennerich@analog.com>, <knaack.h@gmx.de>,
	<lars@metafoo.de>, <pmeerw@pmeerw.net>,
	<gregkh@linuxfoundation.org>, <linux-kernel@vger.kernel.org>,
	<linux-iio@vger.kernel.org>, <devel@driverdev.osuosl.org>,
	<stefan.popa@analog.co>
Subject: [PATCH 09/11] staging: iio: adc: ad7606: Misc style fixes (no functional change)
Date: Thu, 13 Dec 2018 14:46:21 +0200	[thread overview]
Message-ID: <1544705183-13288-10-git-send-email-stefan.popa@analog.com> (raw)
In-Reply-To: <1544705183-13288-1-git-send-email-stefan.popa@analog.com>

* Placed includes in alphabetical order
* Added brackets around num and mask through out for AD760X_CHANNEL
* Used single line comments where needed
* Removed extra lines and spaces

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
---
 drivers/staging/iio/adc/ad7606.c     | 27 ++++++++++++---------------
 drivers/staging/iio/adc/ad7606.h     |  1 -
 drivers/staging/iio/adc/ad7606_par.c | 27 ++++++++-------------------
 drivers/staging/iio/adc/ad7606_spi.c | 16 ++++++++--------
 4 files changed, 28 insertions(+), 43 deletions(-)

diff --git a/drivers/staging/iio/adc/ad7606.c b/drivers/staging/iio/adc/ad7606.c
index 3355301..5733760 100644
--- a/drivers/staging/iio/adc/ad7606.c
+++ b/drivers/staging/iio/adc/ad7606.c
@@ -5,25 +5,25 @@
  * Copyright 2011 Analog Devices Inc.
  */
 
-#include <linux/interrupt.h>
+#include <linux/delay.h>
 #include <linux/device.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/sysfs.h>
-#include <linux/regulator/consumer.h>
 #include <linux/err.h>
 #include <linux/gpio/consumer.h>
-#include <linux/delay.h>
-#include <linux/sched.h>
+#include <linux/interrupt.h>
+#include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/regulator/consumer.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/sysfs.h>
 #include <linux/util_macros.h>
 
 #include <linux/iio/iio.h>
-#include <linux/iio/sysfs.h>
 #include <linux/iio/buffer.h>
-#include <linux/iio/trigger_consumer.h>
+#include <linux/iio/sysfs.h>
 #include <linux/iio/trigger.h>
 #include <linux/iio/triggered_buffer.h>
+#include <linux/iio/trigger_consumer.h>
 
 #include "ad7606.h"
 
@@ -249,8 +249,7 @@ static const struct attribute_group ad7606_attribute_group_range = {
 	.attrs = ad7606_attributes_range,
 };
 
-#define AD760X_CHANNEL(num, mask)				\
-	{							\
+#define AD760X_CHANNEL(num, mask) {				\
 		.type = IIO_VOLTAGE,				\
 		.indexed = 1,					\
 		.channel = num,					\
@@ -265,7 +264,7 @@ static const struct attribute_group ad7606_attribute_group_range = {
 			.storagebits = 16,			\
 			.endianness = IIO_CPU,			\
 		},						\
-	}
+}
 
 #define AD7605_CHANNEL(num)	\
 	AD760X_CHANNEL(num, 0)
@@ -294,9 +293,7 @@ static const struct iio_chan_spec ad7606_channels[] = {
 };
 
 static const struct ad7606_chip_info ad7606_chip_info_tbl[] = {
-	/*
-	 * More devices added in future
-	 */
+	/* More devices added in future */
 	[ID_AD7605_4] = {
 		.channels = ad7605_channels,
 		.num_channels = 5,
diff --git a/drivers/staging/iio/adc/ad7606.h b/drivers/staging/iio/adc/ad7606.h
index b238e9b..40433af 100644
--- a/drivers/staging/iio/adc/ad7606.h
+++ b/drivers/staging/iio/adc/ad7606.h
@@ -14,7 +14,6 @@
  * @num_channels:	number of channels
  * @has_oversampling:   whether the device has oversampling support
  */
-
 struct ad7606_chip_info {
 	const struct iio_chan_spec	*channels;
 	unsigned int			num_channels;
diff --git a/drivers/staging/iio/adc/ad7606_par.c b/drivers/staging/iio/adc/ad7606_par.c
index ac0c7b0..32c7069 100644
--- a/drivers/staging/iio/adc/ad7606_par.c
+++ b/drivers/staging/iio/adc/ad7606_par.c
@@ -26,7 +26,7 @@ static int ad7606_par16_read_block(struct device *dev,
 }
 
 static const struct ad7606_bus_ops ad7606_par16_bops = {
-	.read_block	= ad7606_par16_read_block,
+	.read_block = ad7606_par16_read_block,
 };
 
 static int ad7606_par8_read_block(struct device *dev,
@@ -41,7 +41,7 @@ static int ad7606_par8_read_block(struct device *dev,
 }
 
 static const struct ad7606_bus_ops ad7606_par8_bops = {
-	.read_block	= ad7606_par8_read_block,
+	.read_block = ad7606_par8_read_block,
 };
 
 static int ad7606_par_probe(struct platform_device *pdev)
@@ -72,22 +72,12 @@ static int ad7606_par_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id ad7606_driver_ids[] = {
-	{
-		.name		= "ad7605-4",
-		.driver_data	= ID_AD7605_4,
-	}, {
-		.name		= "ad7606-8",
-		.driver_data	= ID_AD7606_8,
-	}, {
-		.name		= "ad7606-6",
-		.driver_data	= ID_AD7606_6,
-	}, {
-		.name		= "ad7606-4",
-		.driver_data	= ID_AD7606_4,
-	},
+	{ .name	= "ad7605-4", .driver_data = ID_AD7605_4, },
+	{ .name	= "ad7606-4", .driver_data = ID_AD7606_4, },
+	{ .name	= "ad7606-6", .driver_data = ID_AD7606_6, },
+	{ .name	= "ad7606-8", .driver_data = ID_AD7606_8, },
 	{ }
 };
-
 MODULE_DEVICE_TABLE(platform, ad7606_driver_ids);
 
 static const struct of_device_id ad7606_of_match[] = {
@@ -103,12 +93,11 @@ static struct platform_driver ad7606_driver = {
 	.probe = ad7606_par_probe,
 	.id_table = ad7606_driver_ids,
 	.driver = {
-		.name	 = "ad7606",
-		.pm	 = AD7606_PM_OPS,
+		.name = "ad7606",
+		.pm = AD7606_PM_OPS,
 		.of_match_table = ad7606_of_match,
 	},
 };
-
 module_platform_driver(ad7606_driver);
 
 MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
diff --git a/drivers/staging/iio/adc/ad7606_spi.c b/drivers/staging/iio/adc/ad7606_spi.c
index 2608d34..b628389 100644
--- a/drivers/staging/iio/adc/ad7606_spi.c
+++ b/drivers/staging/iio/adc/ad7606_spi.c
@@ -36,7 +36,7 @@ static int ad7606_spi_read_block(struct device *dev,
 }
 
 static const struct ad7606_bus_ops ad7606_spi_bops = {
-	.read_block	= ad7606_spi_read_block,
+	.read_block = ad7606_spi_read_block,
 };
 
 static int ad7606_spi_probe(struct spi_device *spi)
@@ -48,14 +48,14 @@ static int ad7606_spi_probe(struct spi_device *spi)
 			    &ad7606_spi_bops);
 }
 
-static const struct spi_device_id ad7606_id[] = {
-	{"ad7605-4", ID_AD7605_4},
-	{"ad7606-8", ID_AD7606_8},
-	{"ad7606-6", ID_AD7606_6},
-	{"ad7606-4", ID_AD7606_4},
+static const struct spi_device_id ad7606_id_table[] = {
+	{ "ad7605-4", ID_AD7605_4 },
+	{ "ad7606-4", ID_AD7606_4 },
+	{ "ad7606-6", ID_AD7606_6 },
+	{ "ad7606-8", ID_AD7606_8 },
 	{}
 };
-MODULE_DEVICE_TABLE(spi, ad7606_id);
+MODULE_DEVICE_TABLE(spi, ad7606_id_table);
 
 static const struct of_device_id ad7606_of_match[] = {
 	{ .compatible = "adi,ad7605-4" },
@@ -73,7 +73,7 @@ static struct spi_driver ad7606_driver = {
 		.pm = AD7606_PM_OPS,
 	},
 	.probe = ad7606_spi_probe,
-	.id_table = ad7606_id,
+	.id_table = ad7606_id_table,
 };
 module_spi_driver(ad7606_driver);
 
-- 
2.7.4


  parent reply	other threads:[~2018-12-13 12:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 12:46 [PATCH 00/11] staging: iio: ad7606: Move out of staging Stefan Popa
2018-12-13 12:46 ` [PATCH 01/11] staging: iio: adc: ad7606: Simplify the Kconfing menu Stefan Popa
2018-12-13 15:37   ` Rob Herring
2018-12-13 12:46 ` [PATCH 02/11] staging: iio: adc: ad7606: Use SPDX identifier Stefan Popa
2018-12-13 13:21   ` Dan Carpenter
2018-12-13 12:46 ` [PATCH 03/11] staging: iio: adc: ad7606: Use wait-for-completion handler Stefan Popa
2018-12-16 13:41   ` Jonathan Cameron
2018-12-13 12:46 ` [PATCH 04/11] staging: iio: adc: ad7606: Use devm functions in probe Stefan Popa
2018-12-16 13:43   ` Jonathan Cameron
2018-12-13 12:46 ` [PATCH 05/11] staging: iio: adc: ad7606: Add support for threaded irq Stefan Popa
2018-12-13 13:28   ` Dan Carpenter
2018-12-16 13:49   ` Jonathan Cameron
2018-12-17 10:28     ` Popa, Stefan Serban
2018-12-13 12:46 ` [PATCH 06/11] staging: iio: adc: ad7606: Use find_closest() macro Stefan Popa
2018-12-16 13:51   ` Jonathan Cameron
2018-12-13 12:46 ` [PATCH 07/11] staging: iio: adc: ad7606: Use vendor prefix for DT properties Stefan Popa
2018-12-16 13:53   ` Jonathan Cameron
2018-12-13 12:46 ` [PATCH 08/11] staging: iio: adc: ad7606: Add OF device ID table Stefan Popa
2018-12-16 13:54   ` Jonathan Cameron
2018-12-13 12:46 ` Stefan Popa [this message]
2018-12-16 13:56   ` [PATCH 09/11] staging: iio: adc: ad7606: Misc style fixes (no functional change) Jonathan Cameron
2018-12-13 12:46 ` [PATCH 10/11] staging: iio: adc: ad7606: Move out of staging Stefan Popa
2018-12-16 14:14   ` Jonathan Cameron
2018-12-20 19:45   ` kbuild test robot
2018-12-13 12:46 ` [PATCH 11/11] dt-bindings: iio: adc: Add docs for AD7606 ADC Stefan Popa
2018-12-16 13:58   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1544705183-13288-10-git-send-email-stefan.popa@analog.com \
    --to=stefan.popa@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=stefan.popa@analog.co \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.