]> Git Repo - linux.git/commitdiff
Merge tag 'v5.1-rc3' into devel
authorLinus Walleij <[email protected]>
Mon, 8 Apr 2019 11:03:09 +0000 (13:03 +0200)
committerLinus Walleij <[email protected]>
Mon, 8 Apr 2019 11:03:09 +0000 (13:03 +0200)
Linux 5.1-rc3

1  2 
drivers/gpio/gpio-aspeed.c
drivers/gpio/gpiolib.c

index 44aa843fbadae14de93e7b340f2946af26165e44,217507002dbc38ce7a34c64df751ac5887d304d6..0f1b55c7c36141ce81b97360bbe4dfb0010fe208
@@@ -1156,13 -1156,15 +1156,13 @@@ static int __init aspeed_gpio_probe(str
  {
        const struct of_device_id *gpio_id;
        struct aspeed_gpio *gpio;
 -      struct resource *res;
        int rc, i, banks;
  
        gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
        if (!gpio)
                return -ENOMEM;
  
 -      res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 -      gpio->base = devm_ioremap_resource(&pdev->dev, res);
 +      gpio->base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(gpio->base))
                return PTR_ERR(gpio->base);
  
  
        gpio->offset_timer =
                devm_kzalloc(&pdev->dev, gpio->chip.ngpio, GFP_KERNEL);
+       if (!gpio->offset_timer)
+               return -ENOMEM;
  
        return aspeed_gpio_setup_irqs(gpio, pdev);
  }
diff --combined drivers/gpio/gpiolib.c
index e5c3c4bff6fe8dfe181e423687b1ba3a75e45812,0495bf1d480a4cfe464e8ff330922264d03deff7..cb0ffe7fb27ef1bb82490121653895e7a95644a4
@@@ -2565,20 -2565,8 +2565,20 @@@ EXPORT_SYMBOL_GPL(gpiochip_free_own_des
  static int gpio_set_config(struct gpio_chip *gc, unsigned offset,
                           enum pin_config_param mode)
  {
 -      unsigned long config = { PIN_CONF_PACKED(mode, 0) };
 +      unsigned long config;
 +      unsigned arg;
  
 +      switch (mode) {
 +      case PIN_CONFIG_BIAS_PULL_DOWN:
 +      case PIN_CONFIG_BIAS_PULL_UP:
 +              arg = 1;
 +              break;
 +
 +      default:
 +              arg = 0;
 +      }
 +
 +      config = PIN_CONF_PACKED(mode, arg);
        return gc->set_config ? gc->set_config(gc, offset, config) : -ENOTSUPP;
  }
  
@@@ -2788,7 -2776,7 +2788,7 @@@ int gpiod_set_debounce(struct gpio_des
        }
  
        config = pinconf_to_config_packed(PIN_CONFIG_INPUT_DEBOUNCE, debounce);
-       return gpio_set_config(chip, gpio_chip_hwgpio(desc), config);
+       return chip->set_config(chip, gpio_chip_hwgpio(desc), config);
  }
  EXPORT_SYMBOL_GPL(gpiod_set_debounce);
  
@@@ -2825,7 -2813,7 +2825,7 @@@ int gpiod_set_transitory(struct gpio_de
        packed = pinconf_to_config_packed(PIN_CONFIG_PERSIST_STATE,
                                          !transitory);
        gpio = gpio_chip_hwgpio(desc);
-       rc = gpio_set_config(chip, gpio, packed);
+       rc = chip->set_config(chip, gpio, packed);
        if (rc == -ENOTSUPP) {
                dev_dbg(&desc->gdev->dev, "Persistence not supported for GPIO %d\n",
                                gpio);
@@@ -4457,6 -4445,8 +4457,6 @@@ int gpiod_hog(struct gpio_desc *desc, c
  /**
   * gpiochip_free_hogs - Scan gpio-controller chip and release GPIO hog
   * @chip:     gpio chip to act on
 - *
 - * This is only used by of_gpiochip_remove to free hogged gpios
   */
  static void gpiochip_free_hogs(struct gpio_chip *chip)
  {
This page took 0.093351 seconds and 4 git commands to generate.