* [PATCH] thermal/drivers/banggap: Use devm_platform_ioremap_resource()
@ 2023-02-17 3:33 ye.xingchen
0 siblings, 0 replies; only message in thread
From: ye.xingchen @ 2023-02-17 3:33 UTC (permalink / raw)
To: daniel.lezcano; +Cc: rafael, amitk, rui.zhang, linux-pm, linux-kernel
From: Ye Xingchen <ye.xingchen@zte.com.cn>
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to Use devm_platform_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
---
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 22c9bcb899c3..3e3ec846fa50 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.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-17 3:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-17 3:33 [PATCH] thermal/drivers/banggap: Use devm_platform_ioremap_resource() ye.xingchen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®