Commit 0338f6a6 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski

gpiolib: drop tabs from local variable declarations

Older code has an annoying habit of putting tabs between the type and the
name of the variable. This doesn't really add to readability and newer
code doesn't do it so make the entire file consistent.

While at it: convert 'unsigned' to 'unsigned int'.
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 5d5dfc50
...@@ -1036,8 +1036,8 @@ EXPORT_SYMBOL_GPL(gpiochip_add_data_with_key); ...@@ -1036,8 +1036,8 @@ EXPORT_SYMBOL_GPL(gpiochip_add_data_with_key);
void gpiochip_remove(struct gpio_chip *gc) void gpiochip_remove(struct gpio_chip *gc)
{ {
struct gpio_device *gdev = gc->gpiodev; struct gpio_device *gdev = gc->gpiodev;
unsigned long flags; unsigned long flags;
unsigned int i; unsigned int i;
down_write(&gdev->sem); down_write(&gdev->sem);
...@@ -2173,10 +2173,10 @@ EXPORT_SYMBOL_GPL(gpiochip_remove_pin_ranges); ...@@ -2173,10 +2173,10 @@ EXPORT_SYMBOL_GPL(gpiochip_remove_pin_ranges);
*/ */
static int gpiod_request_commit(struct gpio_desc *desc, const char *label) static int gpiod_request_commit(struct gpio_desc *desc, const char *label)
{ {
struct gpio_chip *gc = desc->gdev->chip; struct gpio_chip *gc = desc->gdev->chip;
int ret; unsigned long flags;
unsigned long flags; unsigned int offset;
unsigned offset; int ret;
if (label) { if (label) {
label = kstrdup_const(label, GFP_KERNEL); label = kstrdup_const(label, GFP_KERNEL);
...@@ -2288,9 +2288,9 @@ int gpiod_request(struct gpio_desc *desc, const char *label) ...@@ -2288,9 +2288,9 @@ int gpiod_request(struct gpio_desc *desc, const char *label)
static bool gpiod_free_commit(struct gpio_desc *desc) static bool gpiod_free_commit(struct gpio_desc *desc)
{ {
bool ret = false; struct gpio_chip *gc;
unsigned long flags; unsigned long flags;
struct gpio_chip *gc; bool ret = false;
might_sleep(); might_sleep();
...@@ -2564,8 +2564,8 @@ int gpio_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce) ...@@ -2564,8 +2564,8 @@ int gpio_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce)
*/ */
int gpiod_direction_input(struct gpio_desc *desc) int gpiod_direction_input(struct gpio_desc *desc)
{ {
struct gpio_chip *gc; struct gpio_chip *gc;
int ret = 0; int ret = 0;
VALIDATE_DESC(desc); VALIDATE_DESC(desc);
gc = desc->gdev->chip; gc = desc->gdev->chip;
...@@ -2914,7 +2914,7 @@ static int gpio_chip_get_value(struct gpio_chip *gc, const struct gpio_desc *des ...@@ -2914,7 +2914,7 @@ static int gpio_chip_get_value(struct gpio_chip *gc, const struct gpio_desc *des
static int gpiod_get_raw_value_commit(const struct gpio_desc *desc) static int gpiod_get_raw_value_commit(const struct gpio_desc *desc)
{ {
struct gpio_chip *gc; struct gpio_chip *gc;
int value; int value;
gc = desc->gdev->chip; gc = desc->gdev->chip;
...@@ -3209,7 +3209,7 @@ static void gpio_set_open_source_value_commit(struct gpio_desc *desc, bool value ...@@ -3209,7 +3209,7 @@ static void gpio_set_open_source_value_commit(struct gpio_desc *desc, bool value
static void gpiod_set_raw_value_commit(struct gpio_desc *desc, bool value) static void gpiod_set_raw_value_commit(struct gpio_desc *desc, bool value)
{ {
struct gpio_chip *gc; struct gpio_chip *gc;
gc = desc->gdev->chip; gc = desc->gdev->chip;
trace_gpio_value(desc_to_gpio(desc), 0, value); trace_gpio_value(desc_to_gpio(desc), 0, value);
...@@ -4696,13 +4696,11 @@ core_initcall(gpiolib_dev_init); ...@@ -4696,13 +4696,11 @@ core_initcall(gpiolib_dev_init);
static void gpiolib_dbg_show(struct seq_file *s, struct gpio_device *gdev) static void gpiolib_dbg_show(struct seq_file *s, struct gpio_device *gdev)
{ {
struct gpio_chip *gc = gdev->chip; struct gpio_chip *gc = gdev->chip;
struct gpio_desc *desc; bool active_low, is_irq, is_out;
unsigned gpio = gdev->base; unsigned int gpio = gdev->base;
int value; struct gpio_desc *desc;
bool is_out; int value;
bool is_irq;
bool active_low;
for_each_gpio_desc(gc, desc) { for_each_gpio_desc(gc, desc) {
if (test_bit(FLAG_REQUESTED, &desc->flags)) { if (test_bit(FLAG_REQUESTED, &desc->flags)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment