Skip to content

Commit b27d851

Browse files
andy-shevtorvalds
authored andcommitted
gpio: pca953x: tighten up indentation
There is no need to split some of the lines. However, improve the style of multi-line comment. On top of this there is no need to have double space. Correct above indentation issues without altering the functionality. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Cc: Bartosz Golaszewski <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Rasmus Villemoes <[email protected]> Cc: Thomas Petazzoni <[email protected]> Cc: William Breathitt Gray <[email protected]> Cc: Yury Norov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 35d13d9 commit b27d851

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

drivers/gpio/gpio-pca953x.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,9 @@ static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off)
421421
ret = regmap_read(chip->regmap, inreg, &reg_val);
422422
mutex_unlock(&chip->i2c_lock);
423423
if (ret < 0) {
424-
/* NOTE: diagnostic already emitted; that's all we should
424+
/*
425+
* NOTE:
426+
* diagnostic already emitted; that's all we should
425427
* do unless gpio_*_value_cansleep() calls become different
426428
* from their nonsleeping siblings (and report faults).
427429
*/
@@ -736,8 +738,7 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid)
736738
return IRQ_HANDLED;
737739
}
738740

739-
static int pca953x_irq_setup(struct pca953x_chip *chip,
740-
int irq_base)
741+
static int pca953x_irq_setup(struct pca953x_chip *chip, int irq_base)
741742
{
742743
struct i2c_client *client = chip->client;
743744
struct irq_chip *irq_chip = &chip->irq_chip;
@@ -787,9 +788,9 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
787788
irq_chip->irq_set_type = pca953x_irq_set_type;
788789
irq_chip->irq_shutdown = pca953x_irq_shutdown;
789790

790-
ret = gpiochip_irqchip_add_nested(&chip->gpio_chip, irq_chip,
791-
irq_base, handle_simple_irq,
792-
IRQ_TYPE_NONE);
791+
ret = gpiochip_irqchip_add_nested(&chip->gpio_chip, irq_chip,
792+
irq_base, handle_simple_irq,
793+
IRQ_TYPE_NONE);
793794
if (ret) {
794795
dev_err(&client->dev,
795796
"could not connect irqchip to gpiochip\n");
@@ -863,7 +864,7 @@ static int device_pca957x_init(struct pca953x_chip *chip, u32 invert)
863864
static const struct of_device_id pca953x_dt_ids[];
864865

865866
static int pca953x_probe(struct i2c_client *client,
866-
const struct i2c_device_id *i2c_id)
867+
const struct i2c_device_id *i2c_id)
867868
{
868869
struct pca953x_platform_data *pdata;
869870
struct pca953x_chip *chip;
@@ -872,8 +873,7 @@ static int pca953x_probe(struct i2c_client *client,
872873
u32 invert = 0;
873874
struct regulator *reg;
874875

875-
chip = devm_kzalloc(&client->dev,
876-
sizeof(struct pca953x_chip), GFP_KERNEL);
876+
chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
877877
if (chip == NULL)
878878
return -ENOMEM;
879879

@@ -987,7 +987,7 @@ static int pca953x_probe(struct i2c_client *client,
987987

988988
if (pdata && pdata->setup) {
989989
ret = pdata->setup(client, chip->gpio_chip.base,
990-
chip->gpio_chip.ngpio, pdata->context);
990+
chip->gpio_chip.ngpio, pdata->context);
991991
if (ret < 0)
992992
dev_warn(&client->dev, "setup failed, %d\n", ret);
993993
}
@@ -1007,7 +1007,7 @@ static int pca953x_remove(struct i2c_client *client)
10071007

10081008
if (pdata && pdata->teardown) {
10091009
ret = pdata->teardown(client, chip->gpio_chip.base,
1010-
chip->gpio_chip.ngpio, pdata->context);
1010+
chip->gpio_chip.ngpio, pdata->context);
10111011
if (ret < 0)
10121012
dev_err(&client->dev, "teardown failed, %d\n", ret);
10131013
} else {

0 commit comments

Comments
 (0)