Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git]
/
kernel
/
net
/
rfkill
/
rfkill-gpio.c
diff --git
a/kernel/net/rfkill/rfkill-gpio.c
b/kernel/net/rfkill/rfkill-gpio.c
index
d978f2f
..
9312722
100644
(file)
--- a/
kernel/net/rfkill/rfkill-gpio.c
+++ b/
kernel/net/rfkill/rfkill-gpio.c
@@
-112,21
+112,17
@@
static int rfkill_gpio_probe(struct platform_device *pdev)
rfkill->clk = devm_clk_get(&pdev->dev, NULL);
rfkill->clk = devm_clk_get(&pdev->dev, NULL);
- gpio = devm_gpiod_get(&pdev->dev, "reset");
- if (!IS_ERR(gpio)) {
- ret = gpiod_direction_output(gpio, 0);
- if (ret)
- return ret;
- rfkill->reset_gpio = gpio;
- }
+ gpio = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_LOW);
+ if (IS_ERR(gpio))
+ return PTR_ERR(gpio);
-
gpio = devm_gpiod_get(&pdev->dev, "shutdown")
;
- if (!IS_ERR(gpio)) {
-
ret = gpiod_direction_output(gpio, 0
);
-
if (ret
)
-
return ret
;
- rfkill->shutdown_gpio = gpio;
- }
+
rfkill->reset_gpio = gpio
;
+
+
gpio = devm_gpiod_get_optional(&pdev->dev, "shutdown", GPIOD_OUT_LOW
);
+
if (IS_ERR(gpio)
)
+
return PTR_ERR(gpio)
;
+
+ rfkill->shutdown_gpio = gpio;
/* Make sure at-least one of the GPIO is defined and that
* a name is specified for this instance
/* Make sure at-least one of the GPIO is defined and that
* a name is specified for this instance
@@
-168,7
+164,6
@@
static int rfkill_gpio_remove(struct platform_device *pdev)
#ifdef CONFIG_ACPI
static const struct acpi_device_id rfkill_acpi_match[] = {
{ "BCM2E1A", RFKILL_TYPE_BLUETOOTH },
#ifdef CONFIG_ACPI
static const struct acpi_device_id rfkill_acpi_match[] = {
{ "BCM2E1A", RFKILL_TYPE_BLUETOOTH },
- { "BCM2E39", RFKILL_TYPE_BLUETOOTH },
{ "BCM2E3D", RFKILL_TYPE_BLUETOOTH },
{ "BCM2E40", RFKILL_TYPE_BLUETOOTH },
{ "BCM2E64", RFKILL_TYPE_BLUETOOTH },
{ "BCM2E3D", RFKILL_TYPE_BLUETOOTH },
{ "BCM2E40", RFKILL_TYPE_BLUETOOTH },
{ "BCM2E64", RFKILL_TYPE_BLUETOOTH },