mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
Merge branch 'pci/controller/xgene'
- Use devm for clocks so they're automatically disabled, unprepared, and released if errors happen during probe (Yuho Choi) * pci/controller/xgene: PCI: xgene: Use managed clock for PCIe controller
This commit is contained in:
commit
9471632b0c
|
|
@ -320,18 +320,11 @@ static void xgene_pcie_linkup(struct xgene_pcie *port,
|
|||
static int xgene_pcie_init_port(struct xgene_pcie *port)
|
||||
{
|
||||
struct device *dev = port->dev;
|
||||
int rc;
|
||||
|
||||
port->clk = clk_get(dev, NULL);
|
||||
port->clk = devm_clk_get_enabled(dev, NULL);
|
||||
if (IS_ERR(port->clk)) {
|
||||
dev_err(dev, "clock not available\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
rc = clk_prepare_enable(port->clk);
|
||||
if (rc) {
|
||||
dev_err(dev, "clock enable failed\n");
|
||||
return rc;
|
||||
return PTR_ERR(port->clk);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user