]> asedeno.scripts.mit.edu Git - linux.git/commit
gpio: pca953x: reduce indentation level in pca953x_irq_setup()
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 16 Jan 2019 09:31:57 +0000 (10:31 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 21 Jan 2019 13:04:46 +0000 (14:04 +0100)
commit7341fa7a6bf3f8dc7466bdd340dc5a61efab8902
tree692fa724e18e65ab31262fc5ee10713f72ad77ac
parenta3f1caeefed0731e64bef39859482e6c9de8f027
gpio: pca953x: reduce indentation level in pca953x_irq_setup()

The current design of pca953x_irq_setup() is:

 if (all conditions to support IRQ are met) {
   lots of code to support IRQs, which goes to a serious indentation
   level.
 }

 return 0;

It makes more sense to handle this like this:

 if (!all conditions to support IRQ are met)
   return 0;

 handle IRQ support

This commit does just this change, reducing by one tab the indentation
level of the IRQ setup code. Thanks to this reduced indentation level,
we are less restricted by the 80-column limit, and we can have more
function arguments on the same line.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pca953x.c