d1: add new target
[openwrt/staging/mans0n.git] / target / linux / d1 / patches-6.1 / 0044-hwspinlock-sun6i-Fix-driver-to-match-binding.patch
1 From a19b55088945ce86051ea4eab22df27805a30c71 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Sun, 13 Jun 2021 23:41:44 -0500
4 Subject: [PATCH 044/117] hwspinlock: sun6i: Fix driver to match binding
5
6 The binding for this device does not allow using the clock-names and
7 reset-names properties, so the driver should not reference the clock or
8 reset by name.
9
10 Fixes: 3c881e05c814 ("hwspinlock: add sun6i hardware spinlock support")
11 Signed-off-by: Samuel Holland <samuel@sholland.org>
12 ---
13 drivers/hwspinlock/sun6i_hwspinlock.c | 12 +++++-------
14 1 file changed, 5 insertions(+), 7 deletions(-)
15
16 --- a/drivers/hwspinlock/sun6i_hwspinlock.c
17 +++ b/drivers/hwspinlock/sun6i_hwspinlock.c
18 @@ -104,14 +104,12 @@ static int sun6i_hwspinlock_probe(struct
19 if (!priv)
20 return -ENOMEM;
21
22 - priv->ahb_clk = devm_clk_get(&pdev->dev, "ahb");
23 - if (IS_ERR(priv->ahb_clk)) {
24 - err = PTR_ERR(priv->ahb_clk);
25 - dev_err(&pdev->dev, "unable to get AHB clock (%d)\n", err);
26 - return err;
27 - }
28 + priv->ahb_clk = devm_clk_get(&pdev->dev, NULL);
29 + if (IS_ERR(priv->ahb_clk))
30 + return dev_err_probe(&pdev->dev, PTR_ERR(priv->ahb_clk),
31 + "unable to get AHB clock\n");
32
33 - priv->reset = devm_reset_control_get(&pdev->dev, "ahb");
34 + priv->reset = devm_reset_control_get(&pdev->dev, NULL);
35 if (IS_ERR(priv->reset))
36 return dev_err_probe(&pdev->dev, PTR_ERR(priv->reset),
37 "unable to get reset control\n");