mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-4.21
This commit is contained in:
commit
e6202e8249
1309 changed files with 15723 additions and 7811 deletions
|
|
@ -258,7 +258,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
|
|||
chips->chip.set = davinci_gpio_set;
|
||||
|
||||
chips->chip.ngpio = ngpio;
|
||||
chips->chip.base = -1;
|
||||
chips->chip.base = pdata->no_auto_base ? pdata->base : -1;
|
||||
|
||||
#ifdef CONFIG_OF_GPIO
|
||||
chips->chip.of_gpio_n_cells = 2;
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@
|
|||
#define gpio_mockup_err(...) pr_err(GPIO_MOCKUP_NAME ": " __VA_ARGS__)
|
||||
|
||||
enum {
|
||||
GPIO_MOCKUP_DIR_OUT = 0,
|
||||
GPIO_MOCKUP_DIR_IN = 1,
|
||||
GPIO_MOCKUP_DIR_IN = 0,
|
||||
GPIO_MOCKUP_DIR_OUT = 1,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -131,7 +131,7 @@ static int gpio_mockup_get_direction(struct gpio_chip *gc, unsigned int offset)
|
|||
{
|
||||
struct gpio_mockup_chip *chip = gpiochip_get_data(gc);
|
||||
|
||||
return chip->lines[offset].dir;
|
||||
return !chip->lines[offset].dir;
|
||||
}
|
||||
|
||||
static int gpio_mockup_to_irq(struct gpio_chip *gc, unsigned int offset)
|
||||
|
|
|
|||
|
|
@ -268,8 +268,8 @@ static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
|
|||
|
||||
if (pxa_gpio_has_pinctrl()) {
|
||||
ret = pinctrl_gpio_direction_input(chip->base + offset);
|
||||
if (!ret)
|
||||
return 0;
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&gpio_lock, flags);
|
||||
|
|
|
|||
|
|
@ -1295,7 +1295,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data,
|
|||
gdev->descs = kcalloc(chip->ngpio, sizeof(gdev->descs[0]), GFP_KERNEL);
|
||||
if (!gdev->descs) {
|
||||
status = -ENOMEM;
|
||||
goto err_free_gdev;
|
||||
goto err_free_ida;
|
||||
}
|
||||
|
||||
if (chip->ngpio == 0) {
|
||||
|
|
@ -1427,8 +1427,9 @@ err_free_label:
|
|||
kfree_const(gdev->label);
|
||||
err_free_descs:
|
||||
kfree(gdev->descs);
|
||||
err_free_gdev:
|
||||
err_free_ida:
|
||||
ida_simple_remove(&gpio_ida, gdev->id);
|
||||
err_free_gdev:
|
||||
/* failures here can mean systems won't boot... */
|
||||
pr_err("%s: GPIOs %d..%d (%s) failed to register, %d\n", __func__,
|
||||
gdev->base, gdev->base + gdev->ngpio - 1,
|
||||
|
|
|
|||
Loading…
Reference in a new issue