gpio/pinctrl: make gpio_chip members typed boolean
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 4 Dec 2013 13:42:46 +0000 (14:42 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 4 Dec 2013 13:42:46 +0000 (14:42 +0100)
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: Linus Walleij <linus.walleij@linaro.org>
55 files changed:
drivers/gpio/gpio-74x164.c
drivers/gpio/gpio-adnp.c
drivers/gpio/gpio-adp5520.c
drivers/gpio/gpio-adp5588.c
drivers/gpio/gpio-arizona.c
drivers/gpio/gpio-bt8xx.c
drivers/gpio/gpio-da9052.c
drivers/gpio/gpio-da9055.c
drivers/gpio/gpio-ich.c
drivers/gpio/gpio-intel-mid.c
drivers/gpio/gpio-kempld.c
drivers/gpio/gpio-ks8695.c
drivers/gpio/gpio-lpc32xx.c
drivers/gpio/gpio-lynxpoint.c
drivers/gpio/gpio-max730x.c
drivers/gpio/gpio-max732x.c
drivers/gpio/gpio-mc33880.c
drivers/gpio/gpio-mc9s08dz60.c
drivers/gpio/gpio-mcp23s08.c
drivers/gpio/gpio-ml-ioh.c
drivers/gpio/gpio-msic.c
drivers/gpio/gpio-mvebu.c
drivers/gpio/gpio-octeon.c
drivers/gpio/gpio-palmas.c
drivers/gpio/gpio-pca953x.c
drivers/gpio/gpio-pcf857x.c
drivers/gpio/gpio-pch.c
drivers/gpio/gpio-rc5t583.c
drivers/gpio/gpio-sta2x11.c
drivers/gpio/gpio-stmpe.c
drivers/gpio/gpio-sx150x.c
drivers/gpio/gpio-tb10x.c
drivers/gpio/gpio-tc3589x.c
drivers/gpio/gpio-timberdale.c
drivers/gpio/gpio-tnetv107x.c
drivers/gpio/gpio-tps6586x.c
drivers/gpio/gpio-tps65910.c
drivers/gpio/gpio-tps65912.c
drivers/gpio/gpio-twl4030.c
drivers/gpio/gpio-twl6040.c
drivers/gpio/gpio-ucb1400.c
drivers/gpio/gpio-viperboard.c
drivers/gpio/gpio-vx855.c
drivers/gpio/gpio-wm831x.c
drivers/gpio/gpio-wm8350.c
drivers/gpio/gpio-wm8994.c
drivers/gpio/gpiolib.c
drivers/pinctrl/pinctrl-as3722.c
drivers/pinctrl/pinctrl-at91.c
drivers/pinctrl/pinctrl-baytrail.c
drivers/pinctrl/pinctrl-bcm2835.c
drivers/pinctrl/pinctrl-nomadik.c
drivers/pinctrl/pinctrl-sunxi.c
drivers/pinctrl/vt8500/pinctrl-wmt.c
include/linux/gpio/driver.h

index 1e04bf91328d5895a65799a85b6b874a09710233..ddb831232407b8315cf73d030e60bec6f23e6ac9 100644 (file)
@@ -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;
 
index b204033acaebb4e3fe8489c487a95a5406343f9b..030a3897d9f731dd65d004685fed310b13848c84 100644 (file)
@@ -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;
index 084337d5514d8d1c373413d4c66d1ec1aa317163..613265944e2e3966f57aa21447cd2093422d9ef5 100644 (file)
@@ -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;
index 90fc4c99c024ee39605381c247236644e4c927b4..3f190e68f973bfd551e47bb07999137d33569fdf 100644 (file)
@@ -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;
index dceb5dcf9d16d21da3ac2e022f4b893731cd663c..29bdff558981306c4f9c78419a5bafa723536900 100644 (file)
@@ -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)
index c5c356b7f2cec8e9630cf5c5659c9e6ae3c4824c..ecb3ca2d1d102ab517c23be30b1d801874d7143d 100644 (file)
@@ -169,7 +169,7 @@ static void bt8xxgpio_gpio_setup(struct bt8xxgpio *bg)
        c->dbg_show = NULL;
        c->base = modparam_gpiobase;
        c->ngpio = BT8XXGPIO_NR_GPIOS;
-       c->can_sleep = 0;
+       c->can_sleep = false;
 }
 
 static int bt8xxgpio_probe(struct pci_dev *dev,
index 9b77dc05d4ada6c6744040cf2cdfb5d76c3188a4..416cdf786b05fe4c73ff8f83e83f01676c2e1450 100644 (file)
@@ -200,7 +200,7 @@ static struct gpio_chip reference_gp = {
        .direction_input = da9052_gpio_direction_input,
        .direction_output = da9052_gpio_direction_output,
        .to_irq = da9052_gpio_to_irq,
-       .can_sleep = 1,
+       .can_sleep = true,
        .ngpio = 16,
        .base = -1,
 };
index 7ef0820032bd157a7adadc368cc521d0a7ff57aa..f992997bc30125c64b0731367c56fd4742efe17c 100644 (file)
@@ -134,7 +134,7 @@ static struct gpio_chip reference_gp = {
        .direction_input = da9055_gpio_direction_input,
        .direction_output = da9055_gpio_direction_output,
        .to_irq = da9055_gpio_to_irq,
-       .can_sleep = 1,
+       .can_sleep = true,
        .ngpio = 3,
        .base = -1,
 };
index 814addb62d2cce372ac4a9df25733d6f3f52284e..f5bf3c38bca666fbad9a5a4ac9b52585286a9d37 100644 (file)
@@ -252,7 +252,7 @@ static void ichx_gpiolib_setup(struct gpio_chip *chip)
        chip->direction_output = ichx_gpio_direction_output;
        chip->base = modparam_gpiobase;
        chip->ngpio = ichx_priv.desc->ngpio;
-       chip->can_sleep = 0;
+       chip->can_sleep = false;
        chip->dbg_show = NULL;
 }
 
index f2035c01577f0cd1146254ce20bdb340e1c1d236..1535ebae8fc8208b3e7657d0e304d62f0aefef2b 100644 (file)
@@ -425,7 +425,7 @@ static int intel_gpio_probe(struct pci_dev *pdev,
        priv->chip.to_irq = intel_gpio_to_irq;
        priv->chip.base = gpio_base;
        priv->chip.ngpio = ddata->ngpio;
-       priv->chip.can_sleep = 0;
+       priv->chip.can_sleep = false;
        priv->pdev = pdev;
 
        spin_lock_init(&priv->lock);
index efdc3924d7dfe425c421edbdfc8825f1a8715ced..c6d88173f5a2ab53f267987b0323550c1dc7bd33 100644 (file)
@@ -167,7 +167,7 @@ static int kempld_gpio_probe(struct platform_device *pdev)
        chip->label = "gpio-kempld";
        chip->owner = THIS_MODULE;
        chip->dev = dev;
-       chip->can_sleep = 1;
+       chip->can_sleep = true;
        if (pdata && pdata->gpio_base)
                chip->base = pdata->gpio_base;
        else
index a3ac66ea364b8cce3f624b9000d4e5c53e906c1b..464a83de0d6a48fea14125fc81134e6d1bda21f5 100644 (file)
@@ -228,7 +228,7 @@ static struct gpio_chip ks8695_gpio_chip = {
        .to_irq                 = ks8695_gpio_to_irq,
        .base                   = 0,
        .ngpio                  = 16,
-       .can_sleep              = 0,
+       .can_sleep              = false,
 };
 
 /* Register the GPIOs */
index a7093e010149fd7b17a432e2976b974754936eb8..225344d6640478e230ff04ec15825507f5f59366 100644 (file)
@@ -448,7 +448,7 @@ static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = {
                        .base                   = LPC32XX_GPIO_P0_GRP,
                        .ngpio                  = LPC32XX_GPIO_P0_MAX,
                        .names                  = gpio_p0_names,
-                       .can_sleep              = 0,
+                       .can_sleep              = false,
                },
                .gpio_grp = &gpio_grp_regs_p0,
        },
@@ -464,7 +464,7 @@ static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = {
                        .base                   = LPC32XX_GPIO_P1_GRP,
                        .ngpio                  = LPC32XX_GPIO_P1_MAX,
                        .names                  = gpio_p1_names,
-                       .can_sleep              = 0,
+                       .can_sleep              = false,
                },
                .gpio_grp = &gpio_grp_regs_p1,
        },
@@ -479,7 +479,7 @@ static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = {
                        .base                   = LPC32XX_GPIO_P2_GRP,
                        .ngpio                  = LPC32XX_GPIO_P2_MAX,
                        .names                  = gpio_p2_names,
-                       .can_sleep              = 0,
+                       .can_sleep              = false,
                },
                .gpio_grp = &gpio_grp_regs_p2,
        },
@@ -495,7 +495,7 @@ static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = {
                        .base                   = LPC32XX_GPIO_P3_GRP,
                        .ngpio                  = LPC32XX_GPIO_P3_MAX,
                        .names                  = gpio_p3_names,
-                       .can_sleep              = 0,
+                       .can_sleep              = false,
                },
                .gpio_grp = &gpio_grp_regs_p3,
        },
@@ -509,7 +509,7 @@ static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = {
                        .base                   = LPC32XX_GPI_P3_GRP,
                        .ngpio                  = LPC32XX_GPI_P3_MAX,
                        .names                  = gpi_p3_names,
-                       .can_sleep              = 0,
+                       .can_sleep              = false,
                },
                .gpio_grp = &gpio_grp_regs_p3,
        },
@@ -523,7 +523,7 @@ static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = {
                        .base                   = LPC32XX_GPO_P3_GRP,
                        .ngpio                  = LPC32XX_GPO_P3_MAX,
                        .names                  = gpo_p3_names,
-                       .can_sleep              = 0,
+                       .can_sleep              = false,
                },
                .gpio_grp = &gpio_grp_regs_p3,
        },
index 1a7443ee60160212b552bce7ad84eab88e0bc416..c283cd3b247aa1e8778622186d6dd8b6ba12081e 100644 (file)
@@ -391,7 +391,7 @@ static int lp_gpio_probe(struct platform_device *pdev)
        gc->set = lp_gpio_set;
        gc->base = -1;
        gc->ngpio = LP_NUM_GPIO;
-       gc->can_sleep = 0;
+       gc->can_sleep = false;
        gc->dev = dev;
 
        /* set up interrupts  */
index f4f4ed19bdc13c8211d1eb74244afab51088738f..89226a36b08c9d31bdd4951e811bf88a53c1643d 100644 (file)
@@ -188,7 +188,7 @@ int __max730x_probe(struct max7301 *ts)
        ts->chip.set = max7301_set;
 
        ts->chip.ngpio = PIN_NUMBER;
-       ts->chip.can_sleep = 1;
+       ts->chip.can_sleep = true;
        ts->chip.dev = dev;
        ts->chip.owner = THIS_MODULE;
 
index 91ad74dea8ceab68dc6048ce10a1b14e6ccaf80e..36cb290764b6fc6f13b341af7452cfc9145d1f28 100644 (file)
@@ -564,7 +564,7 @@ static int max732x_setup_gpio(struct max732x_chip *chip,
                gc->set = max732x_gpio_set_value;
        }
        gc->get = max732x_gpio_get_value;
-       gc->can_sleep = 1;
+       gc->can_sleep = true;
 
        gc->base = gpio_start;
        gc->ngpio = port;
index c0b7835f513687fe8f0922ea1aaecc7e2e2ded91..553a80a5eaf3786bcf3e8436d6b4cb16d579c1cc 100644 (file)
@@ -115,7 +115,7 @@ static int mc33880_probe(struct spi_device *spi)
        mc->chip.set = mc33880_set;
        mc->chip.base = pdata->base;
        mc->chip.ngpio = PIN_NUMBER;
-       mc->chip.can_sleep = 1;
+       mc->chip.can_sleep = true;
        mc->chip.dev = &spi->dev;
        mc->chip.owner = THIS_MODULE;
 
index 0ab700046a23eec7f5e6446ea05dc6382ff28e86..dce35ff00db72ff6224dfc519a5928b9bd21a337 100644 (file)
@@ -102,7 +102,7 @@ static int mc9s08dz60_probe(struct i2c_client *client,
        mc9s->chip.dev = &client->dev;
        mc9s->chip.owner = THIS_MODULE;
        mc9s->chip.ngpio = GPIO_NUM;
-       mc9s->chip.can_sleep = 1;
+       mc9s->chip.can_sleep = true;
        mc9s->chip.get = mc9s08dz60_get_value;
        mc9s->chip.set = mc9s08dz60_set_value;
        mc9s->chip.direction_output = mc9s08dz60_direction_output;
index 2deb0c5e54a443a7546c7e4c63bf1e6a833c0d50..b16401ee4766d8fd7a7752fc9dabdb1c0b911653 100644 (file)
@@ -425,7 +425,7 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
        }
 
        mcp->chip.base = base;
-       mcp->chip.can_sleep = 1;
+       mcp->chip.can_sleep = true;
        mcp->chip.dev = dev;
        mcp->chip.owner = THIS_MODULE;
 
index 5c94af3c84e044ddd5f318684bc5f672037002a2..d51329d23d38c4d1188f4d9844ddc2308618ae4a 100644 (file)
@@ -242,7 +242,7 @@ static void ioh_gpio_setup(struct ioh_gpio *chip, int num_port)
        gpio->dbg_show = NULL;
        gpio->base = -1;
        gpio->ngpio = num_port;
-       gpio->can_sleep = 0;
+       gpio->can_sleep = false;
        gpio->to_irq = ioh_gpio_to_irq;
 }
 
index 69d60ab1d698061b05fdc11f1b0f2a921c5bd3ea..8f70ded82a2bb29dabf1695e2f4b8207114e1f0f 100644 (file)
@@ -292,7 +292,7 @@ static int platform_msic_gpio_probe(struct platform_device *pdev)
        mg->chip.to_irq = msic_gpio_to_irq;
        mg->chip.base = pdata->gpio_base;
        mg->chip.ngpio = MSIC_NUM_GPIO;
-       mg->chip.can_sleep = 1;
+       mg->chip.can_sleep = true;
        mg->chip.dev = dev;
 
        mutex_init(&mg->buslock);
index 3c3321f94053ab68f0ab0e691afc1ddf2b83f0e9..a8908009803f5b825f4faec4f877adb5e5dacabe 100644 (file)
@@ -600,7 +600,7 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
        mvchip->chip.to_irq = mvebu_gpio_to_irq;
        mvchip->chip.base = id * MVEBU_MAX_GPIO_PER_BANK;
        mvchip->chip.ngpio = ngpios;
-       mvchip->chip.can_sleep = 0;
+       mvchip->chip.can_sleep = false;
        mvchip->chip.of_node = np;
        mvchip->chip.dbg_show = mvebu_gpio_dbg_show;
 
index 71a4a318315d9f6c37355038ff21e736e156bb90..dbb08546b9ec2e70eb73cd4cf87e76fba39af368 100644 (file)
@@ -111,7 +111,7 @@ static int octeon_gpio_probe(struct platform_device *pdev)
        chip->dev = &pdev->dev;
        chip->owner = THIS_MODULE;
        chip->base = 0;
-       chip->can_sleep = 0;
+       chip->can_sleep = false;
        chip->ngpio = 20;
        chip->direction_input = octeon_gpio_dir_in;
        chip->get = octeon_gpio_get;
index 11801e986dd925f3e60a44042a30f5d8d5ad828e..da9d33252e5603fcc8712db61bb684198fda4673 100644 (file)
@@ -182,7 +182,7 @@ static int palmas_gpio_probe(struct platform_device *pdev)
        palmas_gpio->gpio_chip.owner = THIS_MODULE;
        palmas_gpio->gpio_chip.label = dev_name(&pdev->dev);
        palmas_gpio->gpio_chip.ngpio = dev_data->ngpio;
-       palmas_gpio->gpio_chip.can_sleep = 1;
+       palmas_gpio->gpio_chip.can_sleep = true;
        palmas_gpio->gpio_chip.direction_input = palmas_gpio_input;
        palmas_gpio->gpio_chip.direction_output = palmas_gpio_output;
        palmas_gpio->gpio_chip.to_irq = palmas_gpio_to_irq;
index 6e48c07e3d8c95d84a940b1712b82bb8db1d5e9d..019b23b955a2884c6f2b63233819cdd4d3beee73 100644 (file)
@@ -354,7 +354,7 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
        gc->direction_output = pca953x_gpio_direction_output;
        gc->get = pca953x_gpio_get_value;
        gc->set = pca953x_gpio_set_value;
-       gc->can_sleep = 1;
+       gc->can_sleep = true;
 
        gc->base = chip->gpio_start;
        gc->ngpio = gpios;
index 1535686e74ea9b037e0799b111ccc4ebdb0489e4..82735822bc9d633ae8e54dc2df3e3b5e3ebd5b73 100644 (file)
@@ -305,7 +305,7 @@ static int pcf857x_probe(struct i2c_client *client,
        spin_lock_init(&gpio->slock);
 
        gpio->chip.base                 = pdata ? pdata->gpio_base : -1;
-       gpio->chip.can_sleep            = 1;
+       gpio->chip.can_sleep            = true;
        gpio->chip.dev                  = &client->dev;
        gpio->chip.owner                = THIS_MODULE;
        gpio->chip.get                  = pcf857x_get;
index ef7a756c9ded61412ba208226e843121345ef667..9656c196772ed0d2512074b053d360928c6cd869 100644 (file)
@@ -224,7 +224,7 @@ static void pch_gpio_setup(struct pch_gpio *chip)
        gpio->dbg_show = NULL;
        gpio->base = -1;
        gpio->ngpio = gpio_pins[chip->ioh];
-       gpio->can_sleep = 0;
+       gpio->can_sleep = false;
        gpio->to_irq = pch_gpio_to_irq;
 }
 
index e63d6a397e1780bbefac9720bd2a7f79849eef39..122b776fdc0bc6d15187b19319c2ddb8afa5b3a4 100644 (file)
@@ -133,7 +133,7 @@ static int rc5t583_gpio_probe(struct platform_device *pdev)
        rc5t583_gpio->gpio_chip.get = rc5t583_gpio_get,
        rc5t583_gpio->gpio_chip.to_irq = rc5t583_gpio_to_irq,
        rc5t583_gpio->gpio_chip.ngpio = RC5T583_MAX_GPIO,
-       rc5t583_gpio->gpio_chip.can_sleep = 1,
+       rc5t583_gpio->gpio_chip.can_sleep = true,
        rc5t583_gpio->gpio_chip.dev = &pdev->dev;
        rc5t583_gpio->gpio_chip.base = -1;
        rc5t583_gpio->rc5t583 = rc5t583;
index f2fb12c18da97616b24b9232ac7ce8d271424115..68e3fcb1acea211df4bde311e6bc6d6b95013491 100644 (file)
@@ -146,7 +146,7 @@ static void gsta_gpio_setup(struct gsta_gpio *chip) /* called from probe */
        gpio->dbg_show = NULL;
        gpio->base = gpio_base;
        gpio->ngpio = GSTA_NR_GPIO;
-       gpio->can_sleep = 0;
+       gpio->can_sleep = false;
        gpio->to_irq = gsta_gpio_to_irq;
 
        /*
index 2647e243d4718075a9a3135366ae512df589ae51..2776a09bee58df0207968a74fa9fdc435fb5f402 100644 (file)
@@ -129,7 +129,7 @@ static struct gpio_chip template_chip = {
        .set                    = stmpe_gpio_set,
        .to_irq                 = stmpe_gpio_to_irq,
        .request                = stmpe_gpio_request,
-       .can_sleep              = 1,
+       .can_sleep              = true,
 };
 
 static int stmpe_gpio_irq_set_type(struct irq_data *d, unsigned int type)
index d2983e9ad6af78ee1705b6377cea93f5de41d245..13d73fb2b5e1a2b0346b3cd8e75c4436795cca39 100644 (file)
@@ -436,7 +436,7 @@ static void sx150x_init_chip(struct sx150x_chip *chip,
        chip->gpio_chip.set              = sx150x_gpio_set;
        chip->gpio_chip.to_irq           = sx150x_gpio_to_irq;
        chip->gpio_chip.base             = pdata->gpio_base;
-       chip->gpio_chip.can_sleep        = 1;
+       chip->gpio_chip.can_sleep        = true;
        chip->gpio_chip.ngpio            = chip->dev_cfg->ngpios;
        if (pdata->oscio_is_gpo)
                ++chip->gpio_chip.ngpio;
index 0502b9a041a50a199b40f4d3bf956bcd81dc7fdf..66a54ea4f7791f583faa2fd413dd9d2dce888297 100644 (file)
@@ -221,7 +221,7 @@ static int tb10x_gpio_probe(struct platform_device *pdev)
        tb10x_gpio->gc.free             = tb10x_gpio_free;
        tb10x_gpio->gc.base             = -1;
        tb10x_gpio->gc.ngpio            = ngpio;
-       tb10x_gpio->gc.can_sleep        = 0;
+       tb10x_gpio->gc.can_sleep        = false;
 
 
        ret = gpiochip_add(&tb10x_gpio->gc);
index ddb5fefaa715096823fad4858a7d6bb2c5f7bf5d..1019320984d778f8fd51a26d3be93551349feef8 100644 (file)
@@ -127,7 +127,7 @@ static struct gpio_chip template_chip = {
        .direction_output       = tc3589x_gpio_direction_output,
        .set                    = tc3589x_gpio_set,
        .to_irq                 = tc3589x_gpio_to_irq,
-       .can_sleep              = 1,
+       .can_sleep              = true,
 };
 
 static int tc3589x_gpio_irq_set_type(struct irq_data *d, unsigned int type)
index 521971e6a9f56c674d27468694ec7e89a981bec5..f9a8fbde108e3b424785a12bb5bc52dd06ac1551 100644 (file)
@@ -275,7 +275,7 @@ static int timbgpio_probe(struct platform_device *pdev)
        gc->dbg_show = NULL;
        gc->base = pdata->gpio_base;
        gc->ngpio = pdata->nr_pins;
-       gc->can_sleep = 0;
+       gc->can_sleep = false;
 
        err = gpiochip_add(gc);
        if (err)
index 58445bb69106c71ab648263e731e12151e48c911..4aa481579a058dc8c5f7c57647e87610a0f1888e 100644 (file)
@@ -176,7 +176,7 @@ static int __init tnetv107x_gpio_setup(void)
                ctlr = &chips[i];
 
                ctlr->chip.label        = "tnetv107x";
-               ctlr->chip.can_sleep    = 0;
+               ctlr->chip.can_sleep    = false;
                ctlr->chip.base         = base;
                ctlr->chip.ngpio        = ngpio - base;
                if (ctlr->chip.ngpio > 32)
index 29e8e750bd49580acd38f36f748187d8c60566f7..8994dfa13491bd0bb2a94ac6c72606b61c572e30 100644 (file)
@@ -108,7 +108,7 @@ static int tps6586x_gpio_probe(struct platform_device *pdev)
        tps6586x_gpio->gpio_chip.label = pdev->name;
        tps6586x_gpio->gpio_chip.dev = &pdev->dev;
        tps6586x_gpio->gpio_chip.ngpio = 4;
-       tps6586x_gpio->gpio_chip.can_sleep = 1;
+       tps6586x_gpio->gpio_chip.can_sleep = true;
 
        /* FIXME: add handling of GPIOs as dedicated inputs */
        tps6586x_gpio->gpio_chip.direction_output = tps6586x_gpio_output;
index 06146219d9d21a06087634ae21ad1e7fbb8654e3..b6e818e680076c2041469d47e4ff03f7d7dee8c0 100644 (file)
@@ -143,7 +143,7 @@ static int tps65910_gpio_probe(struct platform_device *pdev)
        default:
                return -EINVAL;
        }
-       tps65910_gpio->gpio_chip.can_sleep = 1;
+       tps65910_gpio->gpio_chip.can_sleep = true;
        tps65910_gpio->gpio_chip.direction_input = tps65910_gpio_input;
        tps65910_gpio->gpio_chip.direction_output = tps65910_gpio_output;
        tps65910_gpio->gpio_chip.set    = tps65910_gpio_set;
index 276a4229b032583379dd1490716dd98565c6bca3..59ee486cb8b918ea8e06f497d87e8e3e74c48261 100644 (file)
@@ -79,7 +79,7 @@ static struct gpio_chip template_chip = {
        .direction_output       = tps65912_gpio_output,
        .get                    = tps65912_gpio_get,
        .set                    = tps65912_gpio_set,
-       .can_sleep              = 1,
+       .can_sleep              = true,
        .ngpio                  = 5,
        .base                   = -1,
 };
index 0c7e891c8651042a8f32e5e6ecf7344cabf6493e..cd06678a29f7447151c375275976c70419d6b5d1 100644 (file)
@@ -386,7 +386,7 @@ static struct gpio_chip template_chip = {
        .direction_output       = twl_direction_out,
        .set                    = twl_set,
        .to_irq                 = twl_to_irq,
-       .can_sleep              = 1,
+       .can_sleep              = true,
 };
 
 /*----------------------------------------------------------------------*/
index d420d30b86e73233314b74f36d8412b4e0c01166..0caf5cd1b47d5f87298edc2c1d859dfa2e6a4dbf 100644 (file)
@@ -77,7 +77,7 @@ static struct gpio_chip twl6040gpo_chip = {
        .get                    = twl6040gpo_get,
        .direction_output       = twl6040gpo_direction_out,
        .set                    = twl6040gpo_set,
-       .can_sleep              = 1,
+       .can_sleep              = true,
 };
 
 /*----------------------------------------------------------------------*/
index 1a605f2a0f55f8fac1675dd18f37dae366215edc..c6a53971387b7f9696b7bf9dcf3862f3e43def80 100644 (file)
@@ -64,7 +64,7 @@ static int ucb1400_gpio_probe(struct platform_device *dev)
        ucb->gc.direction_output = ucb1400_gpio_dir_out;
        ucb->gc.get = ucb1400_gpio_get;
        ucb->gc.set = ucb1400_gpio_set;
-       ucb->gc.can_sleep = 1;
+       ucb->gc.can_sleep = true;
 
        err = gpiochip_add(&ucb->gc);
        if (err)
index 5ac2919197fe70775f8d17fda5a6dafaab9af677..79e3b5836712b1fbbbff1c638751fa761ce3a480 100644 (file)
@@ -413,7 +413,7 @@ static int vprbrd_gpio_probe(struct platform_device *pdev)
        vb_gpio->gpioa.owner = THIS_MODULE;
        vb_gpio->gpioa.base = -1;
        vb_gpio->gpioa.ngpio = 16;
-       vb_gpio->gpioa.can_sleep = 1;
+       vb_gpio->gpioa.can_sleep = true;
        vb_gpio->gpioa.set = vprbrd_gpioa_set;
        vb_gpio->gpioa.get = vprbrd_gpioa_get;
        vb_gpio->gpioa.direction_input = vprbrd_gpioa_direction_input;
@@ -430,7 +430,7 @@ static int vprbrd_gpio_probe(struct platform_device *pdev)
        vb_gpio->gpiob.owner = THIS_MODULE;
        vb_gpio->gpiob.base = -1;
        vb_gpio->gpiob.ngpio = 16;
-       vb_gpio->gpiob.can_sleep = 1;
+       vb_gpio->gpiob.can_sleep = true;
        vb_gpio->gpiob.set = vprbrd_gpiob_set;
        vb_gpio->gpiob.get = vprbrd_gpiob_get;
        vb_gpio->gpiob.direction_input = vprbrd_gpiob_direction_input;
index cddfa22edb410dc3aaaff6ff0c616e812b339966..0fd23b6a753d92576c7b6e09c467aff5f59129e8 100644 (file)
@@ -214,7 +214,7 @@ static void vx855gpio_gpio_setup(struct vx855_gpio *vg)
        c->dbg_show = NULL;
        c->base = 0;
        c->ngpio = NR_VX855_GP;
-       c->can_sleep = 0;
+       c->can_sleep = false;
        c->names = vx855gpio_names;
 }
 
index 456000c5c4579fd380cb00c68b450b883e28dfb7..b18a1a26425ed81e1c676af88d8c5b7c4ca4e8bd 100644 (file)
@@ -240,7 +240,7 @@ static struct gpio_chip template_chip = {
        .to_irq                 = wm831x_gpio_to_irq,
        .set_debounce           = wm831x_gpio_set_debounce,
        .dbg_show               = wm831x_gpio_dbg_show,
-       .can_sleep              = 1,
+       .can_sleep              = true,
 };
 
 static int wm831x_gpio_probe(struct platform_device *pdev)
index fc49154be7b14a8bccf2b7aa58d078b7da939d22..2487f9d575d3013681274a46688864a4d6b3ec52 100644 (file)
@@ -106,7 +106,7 @@ static struct gpio_chip template_chip = {
        .direction_output       = wm8350_gpio_direction_out,
        .set                    = wm8350_gpio_set,
        .to_irq                 = wm8350_gpio_to_irq,
-       .can_sleep              = 1,
+       .can_sleep              = true,
 };
 
 static int wm8350_gpio_probe(struct platform_device *pdev)
index a53dbdefc7ee147c86255fa795c7bacfc1a42d0d..d93b6b581677cada67fba27bed58a66ef1ed89ad 100644 (file)
@@ -242,7 +242,7 @@ static struct gpio_chip template_chip = {
        .set                    = wm8994_gpio_set,
        .to_irq                 = wm8994_gpio_to_irq,
        .dbg_show               = wm8994_gpio_dbg_show,
-       .can_sleep              = 1,
+       .can_sleep              = true,
 };
 
 static int wm8994_gpio_probe(struct platform_device *pdev)
index c6326e44e2c0b86450ec2df4295224d1ee8a398e..94467ddb3711740ba10080d6bc6bd18641f5f586 100644 (file)
@@ -1051,7 +1051,7 @@ static void gpiochip_unexport(struct gpio_chip *chip)
        if (dev) {
                put_device(dev);
                device_unregister(dev);
-               chip->exported = 0;
+               chip->exported = false;
                status = 0;
        } else
                status = -ENODEV;
index 01bffc1d52fd278a9adfa37420e6b792c83531df..b80f1e150f53084409b8929bdea3d2d585c159cc 100644 (file)
@@ -531,7 +531,7 @@ static const struct gpio_chip as3722_gpio_chip = {
        .direction_input        = as3722_gpio_direction_input,
        .direction_output       = as3722_gpio_direction_output,
        .to_irq                 = as3722_gpio_to_irq,
-       .can_sleep              = 1,
+       .can_sleep              = true,
        .ngpio                  = AS3722_PIN_NUM,
        .base                   = -1,
 };
index a7549c4c83b43da6d5c6d108eeec41f95d7710e8..943805185f3f2c4a05b991913cd45d9f51cf030d 100644 (file)
@@ -1527,7 +1527,7 @@ static struct gpio_chip at91_gpio_template = {
        .set                    = at91_gpio_set,
        .to_irq                 = at91_gpio_to_irq,
        .dbg_show               = at91_gpio_dbg_show,
-       .can_sleep              = 0,
+       .can_sleep              = false,
        .ngpio                  = MAX_NB_GPIO_PER_BANK,
 };
 
index 2832576d8b12ee7c99e24896c3fe333dd8cffadc..31c8b3257a945e10b9761d14a850ac5690b3f149 100644 (file)
@@ -461,7 +461,7 @@ static int byt_gpio_probe(struct platform_device *pdev)
        gc->set = byt_gpio_set;
        gc->dbg_show = byt_gpio_dbg_show;
        gc->base = -1;
-       gc->can_sleep = 0;
+       gc->can_sleep = false;
        gc->dev = dev;
 
        ret = gpiochip_add(gc);
index c05c1ef2cc3c8526a886ccefb3f874f795b40807..3d907de9bc91501cc7a83ccd7cfab487bbcab265 100644 (file)
@@ -384,7 +384,7 @@ static struct gpio_chip bcm2835_gpio_chip = {
        .to_irq = bcm2835_gpio_to_irq,
        .base = -1,
        .ngpio = BCM2835_NUM_GPIOS,
-       .can_sleep = 0,
+       .can_sleep = false,
 };
 
 static irqreturn_t bcm2835_gpio_irq_handler(int irq, void *dev_id)
index 7111c3b591303cec2f3daa36d22329989c0847b9..a21820fc4b7c0818f457ed0e8f3cf43fc1869687 100644 (file)
@@ -904,7 +904,7 @@ static struct gpio_chip nmk_gpio_template = {
        .set                    = nmk_gpio_set_output,
        .to_irq                 = nmk_gpio_to_irq,
        .dbg_show               = nmk_gpio_dbg_show,
-       .can_sleep              = 0,
+       .can_sleep              = false,
 };
 
 void nmk_gpio_clocks_enable(void)
index 119d2ddedfe70c2aed27398289c8d1b2b484b160..6b181cb90d39a16e621abd3f001377d91f00d3af 100644 (file)
@@ -547,7 +547,7 @@ static struct gpio_chip sunxi_pinctrl_gpio_chip = {
        .of_xlate               = sunxi_pinctrl_gpio_of_xlate,
        .to_irq                 = sunxi_pinctrl_gpio_to_irq,
        .of_gpio_n_cells        = 3,
-       .can_sleep              = 0,
+       .can_sleep              = false,
 };
 
 static int sunxi_pinctrl_irq_set_type(struct irq_data *d,
index 39aec08508106f21dd515063ae0aa41ca4221367..b28d1af9c2320642c8ee855b07eb15c2355c4948 100644 (file)
@@ -565,7 +565,7 @@ static struct gpio_chip wmt_gpio_chip = {
        .direction_output = wmt_gpio_direction_output,
        .get = wmt_gpio_get_value,
        .set = wmt_gpio_set_value,
-       .can_sleep = 0,
+       .can_sleep = false,
 };
 
 int wmt_pinctrl_probe(struct platform_device *pdev,
index 656a27efb2c8cdd755cd78e20a36e5dd028e5310..804ec45365b78b6d6289702338f181f8fa39e336 100644 (file)
@@ -36,14 +36,15 @@ struct seq_file;
  * @ngpio: the number of GPIOs handled by this controller; the last GPIO
  *     handled is (base + ngpio - 1).
  * @desc: array of ngpio descriptors. Private.
- * @can_sleep: flag must be set iff get()/set() methods sleep, as they
- *     must while accessing GPIO expander chips over I2C or SPI
  * @names: if set, must be an array of strings to use as alternative
  *      names for the GPIOs in this chip. Any entry in the array
  *      may be NULL if there is no alias for the GPIO, however the
  *      array must be @ngpio entries long.  A name can include a single printk
  *      format specifier for an unsigned int.  It is substituted by the actual
  *      number of the gpio.
+ * @can_sleep: flag must be set iff get()/set() methods sleep, as they
+ *     must while accessing GPIO expander chips over I2C or SPI
+ * @exported: flags if the gpiochip is exported for use from sysfs. Private.
  *
  * A gpio_chip can help platforms abstract various sources of GPIOs so
  * they can all be accessed through a common programing interface.
@@ -88,8 +89,8 @@ struct gpio_chip {
        u16                     ngpio;
        struct gpio_desc        *desc;
        const char              *const *names;
-       unsigned                can_sleep:1;
-       unsigned                exported:1;
+       bool                    can_sleep;
+       bool                    exported;
 
 #if defined(CONFIG_OF_GPIO)
        /*
This page took 0.051253 seconds and 5 git commands to generate.