diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-08-09 09:23:23 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-08-09 09:23:23 -0700 |
commit | c808f2ad8fcddb856ce42901cd5b4f06f9da9184 (patch) | |
tree | 2201c88c000a3d52851d241501cdc06c2a487ddb | |
parent | cb42f06c9f418ec2ee56667d01e9ba965a4c61c9 (diff) | |
parent | 6cf9481b440da6d6d86bd8e4c99a8b553b9d1271 (diff) |
Merge tag 'pwm/for-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
Pull pwm fix from Thierry Reding:
"A single fix for a backlight brightness regression introduced in
this merge window"
* tag 'pwm/for-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
pwm: Fallback to the static lookup-list when acpi_pwm_get fails
-rw-r--r-- | drivers/pwm/core.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index c3ab07ab31a9..8edfac17364e 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -882,8 +882,11 @@ struct pwm_device *pwm_get(struct device *dev, const char *con_id) return of_pwm_get(dev, dev->of_node, con_id); /* then lookup via ACPI */ - if (dev && is_acpi_node(dev->fwnode)) - return acpi_pwm_get(dev->fwnode); + if (dev && is_acpi_node(dev->fwnode)) { + pwm = acpi_pwm_get(dev->fwnode); + if (!IS_ERR(pwm) || PTR_ERR(pwm) != -ENOENT) + return pwm; + } /* * We look up the provider in the static table typically provided by |