public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thimo Braker <thibmorozier@gmail.com>
To: gregkh@linuxfoundation.org
Cc: arve@android.com, riandrews@android.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Thimo Braker <thibmorozier@gmail.com>,
	Thimo Braker <thibmorozier@hmail.com>
Subject: [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues
Date: Sat,  7 May 2016 10:56:37 -0500	[thread overview]
Message-ID: <1462636597-15311-1-git-send-email-thibmorozier@gmail.com> (raw)

Fixes issues with the coding style checks.

Signed-off-by: Thimo Braker <thibmorozier@hmail.com>
---
 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

             reply	other threads:[~2016-05-07 15:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-07 15:56 Thimo Braker [this message]
2016-05-07 17:15 ` [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues Greg KH
2016-05-07 18:05   ` Thimo Braker
2016-05-07 19:01     ` Greg KH
2016-05-07 20:24       ` Thimo Braker

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=1462636597-15311-1-git-send-email-thibmorozier@gmail.com \
    --to=thibmorozier@gmail.com \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riandrews@android.com \
    --cc=thibmorozier@hmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox