diff options
Diffstat (limited to 'drivers/clk/mediatek/clk-mt6765.c')
-rw-r--r-- | drivers/clk/mediatek/clk-mt6765.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/clk/mediatek/clk-mt6765.c b/drivers/clk/mediatek/clk-mt6765.c index 0377e6dd3206..1f4c8d0c041a 100644 --- a/drivers/clk/mediatek/clk-mt6765.c +++ b/drivers/clk/mediatek/clk-mt6765.c @@ -9,7 +9,7 @@ #include <linux/of_address.h> #include <linux/slab.h> #include <linux/mfd/syscon.h> -#include <linux/of_device.h> +#include <linux/mod_devicetable.h> #include <linux/platform_device.h> #include "clk-gate.h" @@ -731,13 +731,10 @@ static int clk_mt6765_apmixed_probe(struct platform_device *pdev) int r; struct device_node *node = pdev->dev.of_node; void __iomem *base; - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(base)) { - pr_err("%s(): ioremap failed\n", __func__); + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) return PTR_ERR(base); - } clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK); @@ -766,13 +763,10 @@ static int clk_mt6765_top_probe(struct platform_device *pdev) struct device_node *node = pdev->dev.of_node; void __iomem *base; struct clk_hw_onecell_data *clk_data; - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(base)) { - pr_err("%s(): ioremap failed\n", __func__); + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) return PTR_ERR(base); - } clk_data = mtk_alloc_clk_data(CLK_TOP_NR_CLK); @@ -807,13 +801,10 @@ static int clk_mt6765_ifr_probe(struct platform_device *pdev) int r; struct device_node *node = pdev->dev.of_node; void __iomem *base; - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(base)) { - pr_err("%s(): ioremap failed\n", __func__); + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) return PTR_ERR(base); - } clk_data = mtk_alloc_clk_data(CLK_IFR_NR_CLK); |