lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon,  2 Nov 2020 16:54:49 +0800
From:   Yejune Deng <yejune.deng@...il.com>
To:     robh@...nel.org, tomeu.vizoso@...labora.com, steven.price@....com,
        alyssa.rosenzweig@...labora.com, airlied@...ux.ie, daniel@...ll.ch,
        p.zabel@...gutronix.de
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        yejune.deng@...il.com
Subject: [PATCH] drm/panfrost: Add support for non-existent reset node

Some dts hasn't no reset node, is should ok.

Signed-off-by: Yejune Deng <yejune.deng@...il.com>
---
 drivers/gpu/drm/panfrost/panfrost_device.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
index ea8d318..a982878 100644
--- a/drivers/gpu/drm/panfrost/panfrost_device.c
+++ b/drivers/gpu/drm/panfrost/panfrost_device.c
@@ -18,7 +18,12 @@
 
 static int panfrost_reset_init(struct panfrost_device *pfdev)
 {
-	pfdev->rstc = devm_reset_control_array_get(pfdev->dev, false, true);
+	pfdev->rstc = devm_reset_control_array_get_optional_exclusive(pfdev->dev);
+	if (!pfdev->rstc) {
+		dev_info(pfdev->dev, "reset does not exist\n");
+		return 0;
+	}
+
 	if (IS_ERR(pfdev->rstc)) {
 		dev_err(pfdev->dev, "get reset failed %ld\n", PTR_ERR(pfdev->rstc));
 		return PTR_ERR(pfdev->rstc);
@@ -29,7 +34,8 @@ static int panfrost_reset_init(struct panfrost_device *pfdev)
 
 static void panfrost_reset_fini(struct panfrost_device *pfdev)
 {
-	reset_control_assert(pfdev->rstc);
+	if (pfdev->rstc)
+		reset_control_assert(pfdev->rstc);
 }
 
 static int panfrost_clk_init(struct panfrost_device *pfdev)
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ