[PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes issues with the coding style checks.

Signed-off-by: Thimo Braker <thibmorozier@xxxxxxxxx>
---
 drivers/staging/android/timed_gpio.c   | 36 +++++++++++++++++-----------------
 drivers/staging/android/timed_gpio.h   |  8 ++++----
 drivers/staging/android/timed_output.c | 16 +++++++--------
 3 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c
index 914fd10..61fbed7 100644
--- a/drivers/staging/android/timed_gpio.c
+++ b/drivers/staging/android/timed_gpio.c
@@ -26,17 +26,17 @@
 #include "timed_gpio.h"
 
 struct timed_gpio_data {
-	struct timed_output_dev dev;
-	struct hrtimer timer;
-	spinlock_t lock;
-	unsigned gpio;
-	int max_timeout;
-	u8 active_low;
+	struct timed_output_dev	dev;
+	struct hrtimer		timer;
+	spinlock_t		lock;
+	unsigned int		gpio;
+	int			max_timeout;
+	u8			active_low;
 };
 
 static enum hrtimer_restart gpio_timer_func(struct hrtimer *timer)
 {
-	struct timed_gpio_data *data =
+	struct timed_gpio_data	*data =
 		container_of(timer, struct timed_gpio_data, timer);
 
 	gpio_direction_output(data->gpio, data->active_low ? 1 : 0);
@@ -45,8 +45,8 @@ static enum hrtimer_restart gpio_timer_func(struct hrtimer *timer)
 
 static int gpio_get_time(struct timed_output_dev *dev)
 {
-	struct timed_gpio_data *data;
-	ktime_t t;
+	struct timed_gpio_data	*data;
+	ktime_t			t;
 
 	data = container_of(dev, struct timed_gpio_data, dev);
 
@@ -60,9 +60,9 @@ static int gpio_get_time(struct timed_output_dev *dev)
 
 static void gpio_enable(struct timed_output_dev *dev, int value)
 {
-	struct timed_gpio_data *data =
+	struct timed_gpio_data	*data =
 		container_of(dev, struct timed_gpio_data, dev);
-	unsigned long flags;
+	unsigned long		flags;
 
 	spin_lock_irqsave(&data->lock, flags);
 
@@ -84,10 +84,10 @@ static void gpio_enable(struct timed_output_dev *dev, int value)
 
 static int timed_gpio_probe(struct platform_device *pdev)
 {
-	struct timed_gpio_platform_data *pdata = pdev->dev.platform_data;
-	struct timed_gpio *cur_gpio;
-	struct timed_gpio_data *gpio_data, *gpio_dat;
-	int i, ret;
+	struct timed_gpio_platform_data	*pdata = pdev->dev.platform_data;
+	struct timed_gpio		*cur_gpio;
+	struct timed_gpio_data		*gpio_data, *gpio_dat;
+	int				i, ret;
 
 	if (!pdata)
 		return -EBUSY;
@@ -139,9 +139,9 @@ err_out:
 
 static int timed_gpio_remove(struct platform_device *pdev)
 {
-	struct timed_gpio_platform_data *pdata = pdev->dev.platform_data;
-	struct timed_gpio_data *gpio_data = platform_get_drvdata(pdev);
-	int i;
+	struct timed_gpio_platform_data	*pdata = pdev->dev.platform_data;
+	struct timed_gpio_data		*gpio_data = platform_get_drvdata(pdev);
+	int				i;
 
 	for (i = 0; i < pdata->num_gpios; i++) {
 		timed_output_dev_unregister(&gpio_data[i].dev);
diff --git a/drivers/staging/android/timed_gpio.h b/drivers/staging/android/timed_gpio.h
index d29e169..2068c8f 100644
--- a/drivers/staging/android/timed_gpio.h
+++ b/drivers/staging/android/timed_gpio.h
@@ -19,15 +19,15 @@
 #define TIMED_GPIO_NAME "timed-gpio"
 
 struct timed_gpio {
-	const char *name;
-	unsigned	gpio;
+	const char	*name;
+	unsigned int	gpio;
 	int		max_timeout;
 	u8		active_low;
 };
 
 struct timed_gpio_platform_data {
-	int		num_gpios;
-	struct timed_gpio *gpios;
+	int			num_gpios;
+	struct timed_gpio	*gpios;
 };
 
 #endif
diff --git a/drivers/staging/android/timed_output.c b/drivers/staging/android/timed_output.c
index aff9cdb..05d9863 100644
--- a/drivers/staging/android/timed_output.c
+++ b/drivers/staging/android/timed_output.c
@@ -25,14 +25,14 @@
 
 #include "timed_output.h"
 
-static struct class *timed_output_class;
-static atomic_t device_count;
+static struct class	*timed_output_class;
+static atomic_t		device_count;
 
 static ssize_t enable_show(struct device *dev, struct device_attribute *attr,
 			   char *buf)
 {
-	struct timed_output_dev *tdev = dev_get_drvdata(dev);
-	int remaining = tdev->get_time(tdev);
+	struct timed_output_dev	*tdev = dev_get_drvdata(dev);
+	int			remaining = tdev->get_time(tdev);
 
 	return sprintf(buf, "%d\n", remaining);
 }
@@ -40,9 +40,9 @@ static ssize_t enable_show(struct device *dev, struct device_attribute *attr,
 static ssize_t enable_store(struct device *dev, struct device_attribute *attr,
 			    const char *buf, size_t size)
 {
-	struct timed_output_dev *tdev = dev_get_drvdata(dev);
-	int value;
-	int rc;
+	struct timed_output_dev	*tdev = dev_get_drvdata(dev);
+	int			value;
+	int			rc;
 
 	rc = kstrtoint(buf, 0, &value);
 	if (rc != 0)
@@ -75,7 +75,7 @@ static int create_timed_output_class(void)
 
 int timed_output_dev_register(struct timed_output_dev *tdev)
 {
-	int ret;
+	int	ret;
 
 	if (!tdev || !tdev->name || !tdev->enable || !tdev->get_time)
 		return -EINVAL;
-- 
2.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux