aboutsummaryrefslogtreecommitdiff
path: root/target/linux/d1/patches-6.1/0044-hwspinlock-sun6i-Fix-driver-to-match-binding.patch
blob: 23adcd3af32a95a0563d218732848054004e44e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From a19b55088945ce86051ea4eab22df27805a30c71 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 13 Jun 2021 23:41:44 -0500
Subject: [PATCH 044/117] hwspinlock: sun6i: Fix driver to match binding

The binding for this device does not allow using the clock-names and
reset-names properties, so the driver should not reference the clock or
reset by name.

Fixes: 3c881e05c814 ("hwspinlock: add sun6i hardware spinlock support")
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 drivers/hwspinlock/sun6i_hwspinlock.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

--- a/drivers/hwspinlock/sun6i_hwspinlock.c
+++ b/drivers/hwspinlock/sun6i_hwspinlock.c
@@ -104,14 +104,12 @@ static int sun6i_hwspinlock_probe(struct
 	if (!priv)
 		return -ENOMEM;
 
-	priv->ahb_clk = devm_clk_get(&pdev->dev, "ahb");
-	if (IS_ERR(priv->ahb_clk)) {
-		err = PTR_ERR(priv->ahb_clk);
-		dev_err(&pdev->dev, "unable to get AHB clock (%d)\n", err);
-		return err;
-	}
+	priv->ahb_clk = devm_clk_get(&pdev->dev, NULL);
+	if (IS_ERR(priv->ahb_clk))
+		return dev_err_probe(&pdev->dev, PTR_ERR(priv->ahb_clk),
+				     "unable to get AHB clock\n");
 
-	priv->reset = devm_reset_control_get(&pdev->dev, "ahb");
+	priv->reset = devm_reset_control_get(&pdev->dev, NULL);
 	if (IS_ERR(priv->reset))
 		return dev_err_probe(&pdev->dev, PTR_ERR(priv->reset),
 				     "unable to get reset control\n");