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

Signed-off-by: Andrey Smirnov <[email protected]>
Cc: Chris Healy <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Eduardo Valentin <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
 drivers/thermal/qoriq_thermal.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index 3e147f856bf5..c24629b1b8c2 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -187,9 +187,10 @@ 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;
        u32 site;
 
-       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;
@@ -200,14 +201,14 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
 
        data->sensor_id = qoriq_tmu_get_sensor_id();
        if (data->sensor_id < 0) {
-               dev_err(&pdev->dev, "Failed to get sensor id\n");
+               dev_err(dev, "Failed to get sensor id\n");
                ret = -ENODEV;
                goto err_iomap;
        }
 
        data->regs = of_iomap(np, 0);
        if (!data->regs) {
-               dev_err(&pdev->dev, "Failed to get memory region\n");
+               dev_err(dev, "Failed to get memory region\n");
                ret = -ENODEV;
                goto err_iomap;
        }
@@ -218,13 +219,13 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
        if (ret < 0)
                goto err_tmu;
 
-       data->tz = devm_thermal_zone_of_sensor_register(&pdev->dev,
+       data->tz = devm_thermal_zone_of_sensor_register(dev,
                                                        data->sensor_id,
                                                        data, &tmu_tz_ops);
        if (IS_ERR(data->tz)) {
                ret = PTR_ERR(data->tz);
-               dev_err(&pdev->dev,
-                       "Failed to register thermal zone device %d\n", ret);
+               dev_err(dev, "Failed to register thermal zone device %d\n",
+                       ret);
                goto err_tmu;
        }
 
-- 
2.20.1

Reply via email to