Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'gpio-v4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
"This is a first set of GPIO fixes for the v4.2 series, all hitting
individual drivers and nothing else (except for a documentation
oneliner. I intended to send a request earlier but life intervened)"

* tag 'gpio-v4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
gpio: pca953x: fix nested irqs rescheduling
gpio: omap: prevent module from being unloaded while in use
gpio: max732x: Add missing dev reference to gpiochip
gpio/xilinx: Use correct address when setting initial values.
gpio: zynq: Fix problem with unbalanced pm_runtime_enable
gpio: omap: add missed spin_unlock_irqrestore in omap_gpio_irq_type
gpio: brcmstb: fix null ptr dereference in driver remove
gpio: Remove double "base" in comment

+24 -7
+11 -3
drivers/gpio/gpio-brcmstb.c
··· 87 87 struct brcmstb_gpio_bank *bank; 88 88 int ret = 0; 89 89 90 + if (!priv) { 91 + dev_err(&pdev->dev, "called %s without drvdata!\n", __func__); 92 + return -EFAULT; 93 + } 94 + 95 + /* 96 + * You can lose return values below, but we report all errors, and it's 97 + * more important to actually perform all of the steps. 98 + */ 90 99 list_for_each(pos, &priv->bank_list) { 91 100 bank = list_entry(pos, struct brcmstb_gpio_bank, node); 92 101 ret = bgpio_remove(&bank->bgc); ··· 152 143 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 153 144 if (!priv) 154 145 return -ENOMEM; 146 + platform_set_drvdata(pdev, priv); 147 + INIT_LIST_HEAD(&priv->bank_list); 155 148 156 149 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 157 150 reg_base = devm_ioremap_resource(dev, res); ··· 164 153 priv->reg_base = reg_base; 165 154 priv->pdev = pdev; 166 155 167 - INIT_LIST_HEAD(&priv->bank_list); 168 156 if (brcmstb_gpio_sanity_check_banks(dev, np, res)) 169 157 return -EINVAL; 170 158 ··· 230 220 231 221 dev_info(dev, "Registered %d banks (GPIO(s): %d-%d)\n", 232 222 priv->num_banks, priv->gpio_base, gpio_base - 1); 233 - 234 - platform_set_drvdata(pdev, priv); 235 223 236 224 return 0; 237 225
+1
drivers/gpio/gpio-max732x.c
··· 603 603 gc->base = gpio_start; 604 604 gc->ngpio = port; 605 605 gc->label = chip->client->name; 606 + gc->dev = &chip->client->dev; 606 607 gc->owner = THIS_MODULE; 607 608 608 609 return port;
+4 -1
drivers/gpio/gpio-omap.c
··· 500 500 501 501 spin_lock_irqsave(&bank->lock, flags); 502 502 retval = omap_set_gpio_triggering(bank, offset, type); 503 - if (retval) 503 + if (retval) { 504 + spin_unlock_irqrestore(&bank->lock, flags); 504 505 goto error; 506 + } 505 507 omap_gpio_init_irq(bank, offset); 506 508 if (!omap_gpio_is_input(bank, offset)) { 507 509 spin_unlock_irqrestore(&bank->lock, flags); ··· 1187 1185 bank->irq = res->start; 1188 1186 bank->dev = dev; 1189 1187 bank->chip.dev = dev; 1188 + bank->chip.owner = THIS_MODULE; 1190 1189 bank->dbck_flag = pdata->dbck_flag; 1191 1190 bank->stride = pdata->bank_stride; 1192 1191 bank->width = pdata->bank_width;
+4
drivers/gpio/gpio-pca953x.c
··· 570 570 "could not connect irqchip to gpiochip\n"); 571 571 return ret; 572 572 } 573 + 574 + gpiochip_set_chained_irqchip(&chip->gpio_chip, 575 + &pca953x_irq_chip, 576 + client->irq, NULL); 573 577 } 574 578 575 579 return 0;
+2 -2
drivers/gpio/gpio-xilinx.c
··· 220 220 if (!chip->gpio_width[1]) 221 221 return; 222 222 223 - xgpio_writereg(mm_gc->regs + XGPIO_DATA_OFFSET + XGPIO_TRI_OFFSET, 223 + xgpio_writereg(mm_gc->regs + XGPIO_DATA_OFFSET + XGPIO_CHANNEL_OFFSET, 224 224 chip->gpio_state[1]); 225 - xgpio_writereg(mm_gc->regs + XGPIO_TRI_OFFSET + XGPIO_TRI_OFFSET, 225 + xgpio_writereg(mm_gc->regs + XGPIO_TRI_OFFSET + XGPIO_CHANNEL_OFFSET, 226 226 chip->gpio_dir[1]); 227 227 } 228 228
+1
drivers/gpio/gpio-zynq.c
··· 757 757 gpiochip_remove(&gpio->chip); 758 758 clk_disable_unprepare(gpio->clk); 759 759 device_set_wakeup_capable(&pdev->dev, 0); 760 + pm_runtime_disable(&pdev->dev); 760 761 return 0; 761 762 } 762 763
+1 -1
include/linux/gpio/driver.h
··· 45 45 * @base: identifies the first GPIO number handled by this chip; 46 46 * or, if negative during registration, requests dynamic ID allocation. 47 47 * DEPRECATION: providing anything non-negative and nailing the base 48 - * base offset of GPIO chips is deprecated. Please pass -1 as base to 48 + * offset of GPIO chips is deprecated. Please pass -1 as base to 49 49 * let gpiolib select the chip base in all possible cases. We want to 50 50 * get rid of the static GPIO number space in the long run. 51 51 * @ngpio: the number of GPIOs handled by this controller; the last GPIO