[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4c05e7767bfe401b8c139e159855fe77@sphcmbx02.sunplus.com.tw>
Date: Tue, 22 Mar 2022 02:55:27 +0000
From: Lh Kuo 郭力豪 <lh.Kuo@...plus.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
Li-hao Kuo <lhjeff911@...il.com>,
"rafael@...nel.org" <rafael@...nel.org>,
"daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
"amitk@...nel.org" <amitk@...nel.org>,
"rui.zhang@...el.com" <rui.zhang@...el.com>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: Wells Lu 呂芳騰 <wells.lu@...plus.com>
Subject: RE: [PATCH v5 1/2] thermal: Add thermal driver for Sunplus SP7021
> > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > + if (IS_ERR(res))
> > + return dev_err_probe(&pdev->dev, PTR_ERR(res), "resource get
> > +fail\n");
> > +
> > + sp_data->regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
> > + if (IS_ERR(sp_data->regs))
> > + return dev_err_probe(&pdev->dev, PTR_ERR(sp_data->regs), "mas_base
> > +get fail\n");
>
> Use devm_platform_ioremap_resource() instead.
>
Other drivers must also access these registers.
Warning when using devm_platform_ioremap_resource
Can I keep the original settings?
Powered by blists - more mailing lists