diff options
| -rw-r--r-- | drivers/gpio/gpiolib-acpi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 980a996d0169..533fe5dbe6f8 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c | |||
| @@ -114,10 +114,11 @@ static inline int acpi_gpiochip_pin_to_gpio_offset(struct gpio_chip *chip, | |||
| 114 | * @path: ACPI GPIO controller full path name, (e.g. "\\_SB.GPO1") | 114 | * @path: ACPI GPIO controller full path name, (e.g. "\\_SB.GPO1") |
| 115 | * @pin: ACPI GPIO pin number (0-based, controller-relative) | 115 | * @pin: ACPI GPIO pin number (0-based, controller-relative) |
| 116 | * | 116 | * |
| 117 | * Returns GPIO descriptor to use with Linux generic GPIO API, or ERR_PTR | 117 | * Return: GPIO descriptor to use with Linux generic GPIO API, or ERR_PTR |
| 118 | * error value | 118 | * error value. Specifically returns %-EPROBE_DEFER if the referenced GPIO |
| 119 | * controller does not have gpiochip registered at the moment. This is to | ||
| 120 | * support probe deferral. | ||
| 119 | */ | 121 | */ |
| 120 | |||
| 121 | static struct gpio_desc *acpi_get_gpiod(char *path, int pin) | 122 | static struct gpio_desc *acpi_get_gpiod(char *path, int pin) |
| 122 | { | 123 | { |
| 123 | struct gpio_chip *chip; | 124 | struct gpio_chip *chip; |
| @@ -131,7 +132,7 @@ static struct gpio_desc *acpi_get_gpiod(char *path, int pin) | |||
| 131 | 132 | ||
| 132 | chip = gpiochip_find(handle, acpi_gpiochip_find); | 133 | chip = gpiochip_find(handle, acpi_gpiochip_find); |
| 133 | if (!chip) | 134 | if (!chip) |
| 134 | return ERR_PTR(-ENODEV); | 135 | return ERR_PTR(-EPROBE_DEFER); |
| 135 | 136 | ||
| 136 | offset = acpi_gpiochip_pin_to_gpio_offset(chip, pin); | 137 | offset = acpi_gpiochip_pin_to_gpio_offset(chip, pin); |
| 137 | if (offset < 0) | 138 | if (offset < 0) |
