mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-05 21:35:46 +02:00
clk: axm5516: 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-3-frank.li@vivo.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
47b4ec0da3
commit
495093ef85
|
@ -541,14 +541,12 @@ MODULE_DEVICE_TABLE(of, axmclk_match_table);
|
||||||
static int axmclk_probe(struct platform_device *pdev)
|
static int axmclk_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
void __iomem *base;
|
void __iomem *base;
|
||||||
struct resource *res;
|
|
||||||
int i, ret;
|
int i, ret;
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct regmap *regmap;
|
struct regmap *regmap;
|
||||||
size_t num_clks;
|
size_t num_clks;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
base = devm_ioremap_resource(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