Use a local "struct device *dev" for brevity. No functional change
intended.

Signed-off-by: Andrey Smirnov <andrew.smir...@gmail.com>
Acked-by: Daniel Lezcano <daniel.lezc...@linaro.org>
Tested-by: Lucas Stach <l.st...@pengutronix.de>
Cc: Chris Healy <cphe...@gmail.com>
Cc: Lucas Stach <l.st...@pengutronix.de>
Cc: Eduardo Valentin <edubez...@gmail.com>
Cc: Daniel Lezcano <daniel.lezc...@linaro.org>
Cc: Angus Ainslie (Purism) <an...@akkea.ca>
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/thermal/qoriq_thermal.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index 39542c670301..5df6267a5da0 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -194,8 +194,9 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
        int ret;
        struct qoriq_tmu_data *data;
        struct device_node *np = pdev->dev.of_node;
+       struct device *dev = &pdev->dev;
 
-       data = devm_kzalloc(&pdev->dev, sizeof(struct qoriq_tmu_data),
+       data = devm_kzalloc(dev, sizeof(struct qoriq_tmu_data),
                            GFP_KERNEL);
        if (!data)
                return -ENOMEM;
@@ -206,17 +207,17 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
 
        data->regs = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(data->regs)) {
-               dev_err(&pdev->dev, "Failed to get memory region\n");
+               dev_err(dev, "Failed to get memory region\n");
                return PTR_ERR(data->regs);
        }
 
-       data->clk = devm_clk_get_optional(&pdev->dev, NULL);
+       data->clk = devm_clk_get_optional(dev, NULL);
        if (IS_ERR(data->clk))
                return PTR_ERR(data->clk);
 
        ret = clk_prepare_enable(data->clk);
        if (ret) {
-               dev_err(&pdev->dev, "Failed to enable clock\n");
+               dev_err(dev, "Failed to enable clock\n");
                return ret;
        }
 
@@ -228,7 +229,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
 
        ret = qoriq_tmu_register_tmu_zone(pdev);
        if (ret < 0) {
-               dev_err(&pdev->dev, "Failed to register sensors\n");
+               dev_err(dev, "Failed to register sensors\n");
                ret = -ENODEV;
                goto err;
        }
-- 
2.21.0

Reply via email to