diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-12-10 08:41:42 -0800 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2020-01-27 10:24:32 +0100 |
commit | e167dc43295fb76ff711dd55ce4e39d3656c5481 (patch) | |
tree | 2785c6bc6ced5cbd4eda9031e3531f8dc62082e6 | |
parent | 5ca73af203951c60b328c7f394825b3fa0f6b0b8 (diff) | |
download | linux-e167dc43295fb76ff711dd55ce4e39d3656c5481.tar.bz2 |
thermal: qoriq: Add local struct device pointer
Use a local "struct device *dev" for brevity. No functional change
intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Lucas Stach <l.stach@pengutronix.de>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Angus Ainslie (Purism) <angus@akkea.ca>
Cc: linux-imx@nxp.com
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20191210164153.10463-2-andrew.smirnov@gmail.com
-rw-r--r-- | drivers/thermal/qoriq_thermal.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c index 45e9fcb172cc..dd47b31aeecc 100644 --- a/drivers/thermal/qoriq_thermal.c +++ b/drivers/thermal/qoriq_thermal.c @@ -262,8 +262,9 @@ static int qoriq_tmu_probe(struct platform_device *pdev) u32 ver; 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; @@ -274,17 +275,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; } @@ -302,7 +303,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; } |