mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
clk: actions: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Link: https://lore.kernel.org/r/20230705065313.67043-2-frank.li@vivo.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
ae30512009
commit
47b4ec0da3
@ -41,10 +41,8 @@ int owl_clk_regmap_init(struct platform_device *pdev,
|
|||||||
{
|
{
|
||||||
void __iomem *base;
|
void __iomem *base;
|
||||||
struct regmap *regmap;
|
struct regmap *regmap;
|
||||||
struct resource *res;
|
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
base = devm_ioremap_resource(&pdev->dev, res);
|
|
||||||
if (IS_ERR(base))
|
if (IS_ERR(base))
|
||||||
return PTR_ERR(base);
|
return PTR_ERR(base);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user