Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9fb1f39e authored by Linus Walleij's avatar Linus Walleij
Browse files

gpio/pinctrl: make gpio_chip members typed boolean



This switches the two members of struct gpio_chip that were
defined as unsigned foo:1 to bool, because that is indeed what
they are. Switch all users in the gpio and pinctrl subsystems
to assign these values with true/false instead of 0/1. The
users outside these subsystems will survive since true/false
is 1/0, atleast we set some kind of more strict typing example.

Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent b7d0a28a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ static int gen_74x164_probe(struct spi_device *spi)
		goto exit_destroy;
	}

	chip->gpio_chip.can_sleep = 1;
	chip->gpio_chip.can_sleep = true;
	chip->gpio_chip.dev = &spi->dev;
	chip->gpio_chip.owner = THIS_MODULE;

+1 −1
Original line number Diff line number Diff line
@@ -260,7 +260,7 @@ static int adnp_gpio_setup(struct adnp *adnp, unsigned int num_gpios)
	chip->direction_output = adnp_gpio_direction_output;
	chip->get = adnp_gpio_get;
	chip->set = adnp_gpio_set;
	chip->can_sleep = 1;
	chip->can_sleep = true;

	if (IS_ENABLED(CONFIG_DEBUG_FS))
		chip->dbg_show = adnp_gpio_dbg_show;
+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ static int adp5520_gpio_probe(struct platform_device *pdev)
	gc->direction_output = adp5520_gpio_direction_output;
	gc->get = adp5520_gpio_get_value;
	gc->set = adp5520_gpio_set_value;
	gc->can_sleep = 1;
	gc->can_sleep = true;

	gc->base = pdata->gpio_start;
	gc->ngpio = gpios;
+1 −1
Original line number Diff line number Diff line
@@ -380,7 +380,7 @@ static int adp5588_gpio_probe(struct i2c_client *client,
	gc->direction_output = adp5588_gpio_direction_output;
	gc->get = adp5588_gpio_get_value;
	gc->set = adp5588_gpio_set_value;
	gc->can_sleep = 1;
	gc->can_sleep = true;

	gc->base = pdata->gpio_start;
	gc->ngpio = ADP5588_MAXGPIO;
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ static struct gpio_chip template_chip = {
	.get			= arizona_gpio_get,
	.direction_output	= arizona_gpio_direction_out,
	.set			= arizona_gpio_set,
	.can_sleep		= 1,
	.can_sleep		= true,
};

static int arizona_gpio_probe(struct platform_device *pdev)
Loading