summaryrefslogtreecommitdiffstats
path: root/drivers/soc/amlogic
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-09-08 09:15:43 +0200
committerNeil Armstrong <narmstrong@baylibre.com>2021-09-13 09:43:00 +0200
commitd54dbe9f0ec05935e10d6a38d81e54e2ec8b8a68 (patch)
tree7517611b35d471f0a680d05b6a419bfec3dae5b7 /drivers/soc/amlogic
parentsoc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_r... (diff)
downloadlinux-d54dbe9f0ec05935e10d6a38d81e54e2ec8b8a68.tar.xz
linux-d54dbe9f0ec05935e10d6a38d81e54e2ec8b8a68.zip
soc: amlogic: meson-clk-measure: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://lore.kernel.org/r/20210908071544.603-2-caihuoqing@baidu.com
Diffstat (limited to 'drivers/soc/amlogic')
-rw-r--r--drivers/soc/amlogic/meson-clk-measure.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/soc/amlogic/meson-clk-measure.c b/drivers/soc/amlogic/meson-clk-measure.c
index 6dd190270123..3f3039600357 100644
--- a/drivers/soc/amlogic/meson-clk-measure.c
+++ b/drivers/soc/amlogic/meson-clk-measure.c
@@ -606,7 +606,6 @@ static int meson_msr_probe(struct platform_device *pdev)
{
const struct meson_msr_id *match_data;
struct meson_msr *priv;
- struct resource *res;
struct dentry *root, *clks;
void __iomem *base;
int i;
@@ -624,8 +623,7 @@ static int meson_msr_probe(struct platform_device *pdev)
memcpy(priv->msr_table, match_data, sizeof(priv->msr_table));
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(&pdev->dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);