]> Git Repo - linux.git/blobdiff - drivers/gpio/gpiolib-legacy.c
Merge patch series "riscv: Extension parsing fixes"
[linux.git] / drivers / gpio / gpiolib-legacy.c
index b138682fec3d686a6e334b36a82eccfd8b41ebe8..5a9911ae912509c978e800731871ab671a713fbd 100644 (file)
@@ -28,10 +28,9 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
        struct gpio_desc *desc;
        int err;
 
-       desc = gpio_to_desc(gpio);
-
        /* Compatibility: assume unavailable "valid" GPIOs will appear later */
-       if (!desc && gpio_is_valid(gpio))
+       desc = gpio_to_desc(gpio);
+       if (!desc)
                return -EPROBE_DEFER;
 
        err = gpiod_request(desc, label);
@@ -63,51 +62,13 @@ EXPORT_SYMBOL_GPL(gpio_request_one);
  */
 int gpio_request(unsigned gpio, const char *label)
 {
-       struct gpio_desc *desc = gpio_to_desc(gpio);
+       struct gpio_desc *desc;
 
        /* Compatibility: assume unavailable "valid" GPIOs will appear later */
-       if (!desc && gpio_is_valid(gpio))
+       desc = gpio_to_desc(gpio);
+       if (!desc)
                return -EPROBE_DEFER;
 
        return gpiod_request(desc, label);
 }
 EXPORT_SYMBOL_GPL(gpio_request);
-
-/**
- * gpio_request_array - request multiple GPIOs in a single call
- * @array:     array of the 'struct gpio'
- * @num:       how many GPIOs in the array
- *
- * **DEPRECATED** This function is deprecated and must not be used in new code.
- */
-int gpio_request_array(const struct gpio *array, size_t num)
-{
-       int i, err;
-
-       for (i = 0; i < num; i++, array++) {
-               err = gpio_request_one(array->gpio, array->flags, array->label);
-               if (err)
-                       goto err_free;
-       }
-       return 0;
-
-err_free:
-       while (i--)
-               gpio_free((--array)->gpio);
-       return err;
-}
-EXPORT_SYMBOL_GPL(gpio_request_array);
-
-/**
- * gpio_free_array - release multiple GPIOs in a single call
- * @array:     array of the 'struct gpio'
- * @num:       how many GPIOs in the array
- *
- * **DEPRECATED** This function is deprecated and must not be used in new code.
- */
-void gpio_free_array(const struct gpio *array, size_t num)
-{
-       while (num--)
-               gpio_free((array++)->gpio);
-}
-EXPORT_SYMBOL_GPL(gpio_free_array);
This page took 0.036406 seconds and 4 git commands to generate.