mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
clk: qcom: hfpll: use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/202211171403340042731@zte.com.cn
This commit is contained in:
committed by
Bjorn Andersson
parent
35dc8e101a
commit
0c44be0639
@@ -47,7 +47,6 @@ static const struct regmap_config hfpll_regmap_config = {
|
|||||||
|
|
||||||
static int qcom_hfpll_probe(struct platform_device *pdev)
|
static int qcom_hfpll_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct resource *res;
|
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
void __iomem *base;
|
void __iomem *base;
|
||||||
struct regmap *regmap;
|
struct regmap *regmap;
|
||||||
@@ -70,8 +69,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev)
|
|||||||
if (!h)
|
if (!h)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
|
||||||
base = devm_ioremap_resource(dev, res);
|
|
||||||
if (IS_ERR(base))
|
if (IS_ERR(base))
|
||||||
return PTR_ERR(base);
|
return PTR_ERR(base);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user