Skip to content

Commit 0338f6a

Browse files
author
Bartosz Golaszewski
committed
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: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent 5d5dfc5 commit 0338f6a

1 file changed

Lines changed: 18 additions & 20 deletions

File tree

drivers/gpio/gpiolib.c

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,8 +1036,8 @@ EXPORT_SYMBOL_GPL(gpiochip_add_data_with_key);
10361036
void gpiochip_remove(struct gpio_chip *gc)
10371037
{
10381038
struct gpio_device *gdev = gc->gpiodev;
1039-
unsigned long flags;
1040-
unsigned int i;
1039+
unsigned long flags;
1040+
unsigned int i;
10411041

10421042
down_write(&gdev->sem);
10431043

@@ -2173,10 +2173,10 @@ EXPORT_SYMBOL_GPL(gpiochip_remove_pin_ranges);
21732173
*/
21742174
static int gpiod_request_commit(struct gpio_desc *desc, const char *label)
21752175
{
2176-
struct gpio_chip *gc = desc->gdev->chip;
2177-
int ret;
2178-
unsigned long flags;
2179-
unsigned offset;
2176+
struct gpio_chip *gc = desc->gdev->chip;
2177+
unsigned long flags;
2178+
unsigned int offset;
2179+
int ret;
21802180

21812181
if (label) {
21822182
label = kstrdup_const(label, GFP_KERNEL);
@@ -2288,9 +2288,9 @@ int gpiod_request(struct gpio_desc *desc, const char *label)
22882288

22892289
static bool gpiod_free_commit(struct gpio_desc *desc)
22902290
{
2291-
bool ret = false;
2292-
unsigned long flags;
2293-
struct gpio_chip *gc;
2291+
struct gpio_chip *gc;
2292+
unsigned long flags;
2293+
bool ret = false;
22942294

22952295
might_sleep();
22962296

@@ -2564,8 +2564,8 @@ int gpio_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce)
25642564
*/
25652565
int gpiod_direction_input(struct gpio_desc *desc)
25662566
{
2567-
struct gpio_chip *gc;
2568-
int ret = 0;
2567+
struct gpio_chip *gc;
2568+
int ret = 0;
25692569

25702570
VALIDATE_DESC(desc);
25712571
gc = desc->gdev->chip;
@@ -2914,7 +2914,7 @@ static int gpio_chip_get_value(struct gpio_chip *gc, const struct gpio_desc *des
29142914

29152915
static int gpiod_get_raw_value_commit(const struct gpio_desc *desc)
29162916
{
2917-
struct gpio_chip *gc;
2917+
struct gpio_chip *gc;
29182918
int value;
29192919

29202920
gc = desc->gdev->chip;
@@ -3209,7 +3209,7 @@ static void gpio_set_open_source_value_commit(struct gpio_desc *desc, bool value
32093209

32103210
static void gpiod_set_raw_value_commit(struct gpio_desc *desc, bool value)
32113211
{
3212-
struct gpio_chip *gc;
3212+
struct gpio_chip *gc;
32133213

32143214
gc = desc->gdev->chip;
32153215
trace_gpio_value(desc_to_gpio(desc), 0, value);
@@ -4696,13 +4696,11 @@ core_initcall(gpiolib_dev_init);
46964696

46974697
static void gpiolib_dbg_show(struct seq_file *s, struct gpio_device *gdev)
46984698
{
4699-
struct gpio_chip *gc = gdev->chip;
4700-
struct gpio_desc *desc;
4701-
unsigned gpio = gdev->base;
4702-
int value;
4703-
bool is_out;
4704-
bool is_irq;
4705-
bool active_low;
4699+
struct gpio_chip *gc = gdev->chip;
4700+
bool active_low, is_irq, is_out;
4701+
unsigned int gpio = gdev->base;
4702+
struct gpio_desc *desc;
4703+
int value;
47064704

47074705
for_each_gpio_desc(gc, desc) {
47084706
if (test_bit(FLAG_REQUESTED, &desc->flags)) {

0 commit comments

Comments
 (0)