diff options
| author | Michael Bestas <mkbestas@lineageos.org> | 2020-12-30 23:59:22 +0200 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2020-12-30 23:59:22 +0200 |
| commit | 8bca2095c58bfc17532ab9a6259d341decee1288 (patch) | |
| tree | 6d6fe55982d5b77d369095408ab60797bf9ed4cb /drivers/pinctrl/pinctrl-falcon.c | |
| parent | 96d93de231c6f2e261efe1307c0e9d23d62f3075 (diff) | |
| parent | 300d539b8e6e297ffd986afec63a88415eced57d (diff) | |
Merge branch 'android-4.4-p' of https://android.googlesource.com/kernel/common into lineage-18.1-caf-msm8998
This brings LA.UM.9.2.r1-01800-SDMxx0.0 up to date with
https://android.googlesource.com/kernel/common/ android-4.4-p at commit:
300d539b8e6e2 ANDROID: usb: f_accessory: Wrap '_acc_dev' in get()/put() accessors
Conflicts:
drivers/usb/gadget/function/f_accessory.c
include/linux/spi/spi.h
Change-Id: Ifef5bfcb9d92b6d560126f0216369c567476f55d
Diffstat (limited to 'drivers/pinctrl/pinctrl-falcon.c')
| -rw-r--r-- | drivers/pinctrl/pinctrl-falcon.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-falcon.c b/drivers/pinctrl/pinctrl-falcon.c index 0b0fc2eb48e0..adcdb0585d39 100644 --- a/drivers/pinctrl/pinctrl-falcon.c +++ b/drivers/pinctrl/pinctrl-falcon.c @@ -438,24 +438,28 @@ static int pinctrl_falcon_probe(struct platform_device *pdev) /* load and remap the pad resources of the different banks */ for_each_compatible_node(np, NULL, "lantiq,pad-falcon") { - struct platform_device *ppdev = of_find_device_by_node(np); const __be32 *bank = of_get_property(np, "lantiq,bank", NULL); struct resource res; + struct platform_device *ppdev; u32 avail; int pins; if (!of_device_is_available(np)) continue; - if (!ppdev) { - dev_err(&pdev->dev, "failed to find pad pdev\n"); - continue; - } if (!bank || *bank >= PORTS) continue; if (of_address_to_resource(np, 0, &res)) continue; + + ppdev = of_find_device_by_node(np); + if (!ppdev) { + dev_err(&pdev->dev, "failed to find pad pdev\n"); + continue; + } + falcon_info.clk[*bank] = clk_get(&ppdev->dev, NULL); + put_device(&ppdev->dev); if (IS_ERR(falcon_info.clk[*bank])) { dev_err(&ppdev->dev, "failed to get clock\n"); return PTR_ERR(falcon_info.clk[*bank]); |
