mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
clk: axi-clkgen: use devm_platform_ioremap_resource() short-hand
No major functional change. Noticed while checking the driver code that this could be used. Saves two lines. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20210201151245.21845-5-alexandru.ardelean@analog.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
committed by
Stephen Boyd
parent
99da100bac
commit
6ba7ea7630
@@ -510,7 +510,6 @@ static int axi_clkgen_probe(struct platform_device *pdev)
|
|||||||
struct clk_init_data init;
|
struct clk_init_data init;
|
||||||
const char *parent_names[2];
|
const char *parent_names[2];
|
||||||
const char *clk_name;
|
const char *clk_name;
|
||||||
struct resource *mem;
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -522,8 +521,7 @@ static int axi_clkgen_probe(struct platform_device *pdev)
|
|||||||
if (!axi_clkgen)
|
if (!axi_clkgen)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
axi_clkgen->base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
axi_clkgen->base = devm_ioremap_resource(&pdev->dev, mem);
|
|
||||||
if (IS_ERR(axi_clkgen->base))
|
if (IS_ERR(axi_clkgen->base))
|
||||||
return PTR_ERR(axi_clkgen->base);
|
return PTR_ERR(axi_clkgen->base);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user