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]
Message-Id: <20230626124334.15100-1-frank.li@vivo.com>
Date:   Mon, 26 Jun 2023 20:43:28 +0800
From:   Yangtao Li <frank.li@...o.com>
To:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>
Cc:     Yangtao Li <frank.li@...o.com>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 1/6] drivers/thermal/k3: Convert to devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@...o.com>
---
 drivers/thermal/k3_bandgap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/thermal/k3_bandgap.c b/drivers/thermal/k3_bandgap.c
index 1c3e590157ec..dadb5d070455 100644
--- a/drivers/thermal/k3_bandgap.c
+++ b/drivers/thermal/k3_bandgap.c
@@ -160,7 +160,6 @@ static const struct of_device_id of_k3_bandgap_match[];
 static int k3_bandgap_probe(struct platform_device *pdev)
 {
 	int ret = 0, cnt, val, id;
-	struct resource *res;
 	struct device *dev = &pdev->dev;
 	struct k3_bandgap *bgp;
 	struct k3_thermal_data *data;
@@ -173,8 +172,7 @@ static int k3_bandgap_probe(struct platform_device *pdev)
 	if (!bgp)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	bgp->base = devm_ioremap_resource(dev, res);
+	bgp->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(bgp->base))
 		return PTR_ERR(bgp->base);
 
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ