* [PATCH -next] thermal: Use devm_platform_ioremap_resource()
@ 2023-03-08 6:27 Yang Li
2023-03-13 11:27 ` Daniel Lezcano
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2023-03-08 6:27 UTC (permalink / raw)
To: rafael; +Cc: daniel.lezcano, amitk, rui.zhang, linux-pm, linux-kernel, Yang Li
According to commit 7945f929f1a7 ("drivers: provide
devm_platform_ioremap_resource()"), 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: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/thermal/hisi_thermal.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
index 0d135b8a5b62..3f09ef8be41a 100644
--- a/drivers/thermal/hisi_thermal.c
+++ b/drivers/thermal/hisi_thermal.c
@@ -544,7 +544,6 @@ static int hisi_thermal_probe(struct platform_device *pdev)
{
struct hisi_thermal_data *data;
struct device *dev = &pdev->dev;
- struct resource *res;
int i, ret;
data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
@@ -555,8 +554,7 @@ static int hisi_thermal_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, data);
data->ops = of_device_get_match_data(dev);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- data->regs = devm_ioremap_resource(dev, res);
+ data->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(data->regs))
return PTR_ERR(data->regs);
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] thermal: Use devm_platform_ioremap_resource()
2023-03-08 6:27 [PATCH -next] thermal: Use devm_platform_ioremap_resource() Yang Li
@ 2023-03-13 11:27 ` Daniel Lezcano
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2023-03-13 11:27 UTC (permalink / raw)
To: Yang Li, rafael; +Cc: amitk, rui.zhang, linux-pm, linux-kernel
On 08/03/2023 07:27, Yang Li wrote:
> According to commit 7945f929f1a7 ("drivers: provide
> devm_platform_ioremap_resource()"), 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: Yang Li <yang.lee@linux.alibaba.com>
> ---
Applied, thanks
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-13 11:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-08 6:27 [PATCH -next] thermal: Use devm_platform_ioremap_resource() Yang Li
2023-03-13 11:27 ` Daniel Lezcano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox