lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191209195749.868-7-tiny.windzz@gmail.com>
Date:   Mon,  9 Dec 2019 19:57:39 +0000
From:   Yangtao Li <tiny.windzz@...il.com>
To:     afaerber@...e.de, manivannan.sadhasivam@...aro.org,
        mturquette@...libre.com, sboyd@...nel.org,
        Eugeniy.Paltsev@...opsys.com, shawnguo@...nel.org,
        s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
        linux-imx@....com, agross@...nel.org, s.nawrocki@...sung.com,
        tomasz.figa@...il.com, cw00.choi@...sung.com, kgene@...nel.org,
        krzk@...nel.org, palmer@...ive.com, paul.walmsley@...ive.com,
        dinguyen@...nel.org, mripard@...nel.org, wens@...e.org,
        emilio@...pez.com.ar, pdeschrijver@...dia.com, pgaikwad@...dia.com,
        thierry.reding@...il.com, jonathanh@...dia.com,
        matthias.bgg@...il.com, rfontana@...hat.com,
        gregkh@...uxfoundation.org, t-kristo@...com, john@...ozen.org,
        tglx@...utronix.de, allison@...utok.net,
        kstewart@...uxfoundation.org, swinslow@...il.com,
        aisheng.dong@....com, robh@...nel.org, daniel.baluta@....com,
        weiyongjun1@...wei.com, wangyan.wang@...iatek.com,
        chunhui.dai@...iatek.com, miquel.raynal@...tlin.com,
        heiko@...ech.de, jcmvbkbc@...il.com, nsekhar@...com,
        geert+renesas@...der.be
Cc:     linux-arm-kernel@...ts.infradead.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-samsung-soc@...r.kernel.org, linux-riscv@...ts.infradead.org,
        linux-tegra@...r.kernel.org, linux-mediatek@...ts.infradead.org,
        Yangtao Li <tiny.windzz@...il.com>
Subject: [PATCH 07/17] clk: mvebu: convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
---
 drivers/clk/mvebu/armada-37xx-periph.c | 4 +---
 drivers/clk/mvebu/armada-37xx-tbg.c    | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c
index f5746f9ea929..0d03878920ac 100644
--- a/drivers/clk/mvebu/armada-37xx-periph.c
+++ b/drivers/clk/mvebu/armada-37xx-periph.c
@@ -725,7 +725,6 @@ static int armada_3700_periph_clock_probe(struct platform_device *pdev)
 	const struct clk_periph_data *data;
 	struct device *dev = &pdev->dev;
 	int num_periph = 0, i, ret;
-	struct resource *res;
 
 	data = of_device_get_match_data(dev);
 	if (!data)
@@ -746,8 +745,7 @@ static int armada_3700_periph_clock_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	driver_data->hw_data->num = num_periph;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	driver_data->reg = devm_ioremap_resource(dev, res);
+	driver_data->reg = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(driver_data->reg))
 		return PTR_ERR(driver_data->reg);
 
diff --git a/drivers/clk/mvebu/armada-37xx-tbg.c b/drivers/clk/mvebu/armada-37xx-tbg.c
index 585a02e0b330..5d86912fbb6e 100644
--- a/drivers/clk/mvebu/armada-37xx-tbg.c
+++ b/drivers/clk/mvebu/armada-37xx-tbg.c
@@ -84,7 +84,6 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev)
 	struct clk_hw_onecell_data *hw_tbg_data;
 	struct device *dev = &pdev->dev;
 	const char *parent_name;
-	struct resource *res;
 	struct clk *parent;
 	void __iomem *reg;
 	int i, ret;
@@ -105,8 +104,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev)
 	parent_name = __clk_get_name(parent);
 	clk_put(parent);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	reg = devm_ioremap_resource(dev, res);
+	reg = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(reg))
 		return PTR_ERR(reg);
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ