Skip to content

Commit 6cba789

Browse files
Minghao Chibebarino
authored andcommitted
clock: milbeaut: use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Minghao Chi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 12ca59b commit 6cba789

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/clk-milbeaut.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,14 +560,12 @@ static void m10v_reg_mux_pre(const struct m10v_clk_mux_factors *factors,
560560
static int m10v_clk_probe(struct platform_device *pdev)
561561
{
562562
int id;
563-
struct resource *res;
564563
struct device *dev = &pdev->dev;
565564
struct device_node *np = dev->of_node;
566565
void __iomem *base;
567566
const char *parent_name;
568567

569-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
570-
base = devm_ioremap_resource(dev, res);
568+
base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
571569
if (IS_ERR(base))
572570
return PTR_ERR(base);
573571

0 commit comments

Comments
 (0)