mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
clk: fsl-sai: 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-5-frank.li@vivo.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
3b392629e2
commit
d1aa4546e2
@ -33,14 +33,12 @@ static int fsl_sai_clk_probe(struct platform_device *pdev)
|
||||
struct clk_parent_data pdata = { .index = 0 };
|
||||
void __iomem *base;
|
||||
struct clk_hw *hw;
|
||||
struct resource *res;
|
||||
|
||||
sai_clk = devm_kzalloc(dev, sizeof(*sai_clk), GFP_KERNEL);
|
||||
if (!sai_clk)
|
||||
return -ENOMEM;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
base = devm_ioremap_resource(dev, res);
|
||||
base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user