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 1e04bf9..ddb8312 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 b204033..030a389 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 084337d..6132659 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 90fc4c9..3f190e6 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 dceb5dc..29bdff5 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 c5c356b..ecb3ca2 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 9b77dc0..416cdf7 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 7ef0820..f992997 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 814addb..f5bf3c3 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 f2035c0..1535eba 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 efdc392..c6d8817 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 a3ac66e..464a83d 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 a7093e0..225344d 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 1a7443e..c283cd3 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 f4f4ed1..89226a3 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 91ad74d..36cb290 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 c0b7835..553a80a 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 0ab7000..dce35ff 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 2deb0c5..b16401e 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 5c94af3..d51329d 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 69d60ab..8f70ded 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 3c3321f..a890800 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 71a4a31..dbb0854 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 11801e9..da9d332 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 6e48c07..019b23b 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 1535686..8273582 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 ef7a756..9656c19 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 e63d6a3..122b776 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 f2fb12c..68e3fcb 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 2647e24..2776a09 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 d2983e9..13d73fb 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 0502b9a..66a54ea 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 ddb5fef..1019320 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 521971e..f9a8fbd 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 58445bb..4aa4815 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 29e8e75..8994dfa 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 0614621..b6e818e 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 276a422..59ee486 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 0c7e891..cd06678 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 d420d30..0caf5cd 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 1a605f2..c6a5397 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 5ac2919..79e3b58 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 cddfa22..0fd23b6 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 456000c..b18a1a2 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 fc49154..2487f9d 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 a53dbde..d93b6b5 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 c6326e4..94467dd 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 01bffc1..b80f1e1 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 a7549c4..9438051 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 2832576..31c8b32 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 c05c1ef..3d907de 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 7111c3b..a21820f 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 119d2dd..6b181cb 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 39aec08..b28d1af 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 656a27e..804ec45 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)
        /*