mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
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
This commit is contained in:
parent
97a4a24087
commit
d54dbe9f0e
@ -606,7 +606,6 @@ static int meson_msr_probe(struct platform_device *pdev)
|
|||||||
{
|
{
|
||||||
const struct meson_msr_id *match_data;
|
const struct meson_msr_id *match_data;
|
||||||
struct meson_msr *priv;
|
struct meson_msr *priv;
|
||||||
struct resource *res;
|
|
||||||
struct dentry *root, *clks;
|
struct dentry *root, *clks;
|
||||||
void __iomem *base;
|
void __iomem *base;
|
||||||
int i;
|
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));
|
memcpy(priv->msr_table, match_data, sizeof(priv->msr_table));
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
base = devm_ioremap_resource(&pdev->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