We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56a5732 commit 793ee79Copy full SHA for 793ee79
drivers/clk/sprd/common.c
@@ -42,7 +42,6 @@ int sprd_clk_regmap_init(struct platform_device *pdev,
42
void __iomem *base;
43
struct device_node *node = pdev->dev.of_node;
44
struct regmap *regmap;
45
- struct resource *res;
46
47
if (of_find_property(node, "sprd,syscon", NULL)) {
48
regmap = syscon_regmap_lookup_by_phandle(node, "sprd,syscon");
@@ -51,8 +50,7 @@ int sprd_clk_regmap_init(struct platform_device *pdev,
51
50
return PTR_ERR(regmap);
52
}
53
} else {
54
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
55
- base = devm_ioremap_resource(&pdev->dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
56
if (IS_ERR(base))
57
return PTR_ERR(base);
58
0 commit comments