mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
Merge branch 'pci/ctrl/aardvark'
- Switch to using devm_gpiod_get_optional() so we can stop exporting devm_gpiod_get_from_of_node() (Dmitry Torokhov) * pci/ctrl/aardvark: PCI: aardvark: Switch to using devm_gpiod_get_optional()
This commit is contained in:
commit
0454c6c0ed
@ -1859,20 +1859,18 @@ static int advk_pcie_probe(struct platform_device *pdev)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
pcie->reset_gpio = devm_gpiod_get_from_of_node(dev, dev->of_node,
|
pcie->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
|
||||||
"reset-gpios", 0,
|
|
||||||
GPIOD_OUT_LOW,
|
|
||||||
"pcie1-reset");
|
|
||||||
ret = PTR_ERR_OR_ZERO(pcie->reset_gpio);
|
ret = PTR_ERR_OR_ZERO(pcie->reset_gpio);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (ret == -ENOENT) {
|
if (ret != -EPROBE_DEFER)
|
||||||
pcie->reset_gpio = NULL;
|
dev_err(dev, "Failed to get reset-gpio: %i\n", ret);
|
||||||
} else {
|
return ret;
|
||||||
if (ret != -EPROBE_DEFER)
|
}
|
||||||
dev_err(dev, "Failed to get reset-gpio: %i\n",
|
|
||||||
ret);
|
ret = gpiod_set_consumer_name(pcie->reset_gpio, "pcie1-reset");
|
||||||
return ret;
|
if (ret) {
|
||||||
}
|
dev_err(dev, "Failed to set reset gpio name: %d\n", ret);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = of_pci_get_max_link_speed(dev->of_node);
|
ret = of_pci_get_max_link_speed(dev->of_node);
|
||||||
|
Loading…
Reference in New Issue
Block a user