Commit 45241fc4 authored by Andrey Smirnov's avatar Andrey Smirnov Committed by Angus Ainslie (Purism)

thermal: qoriq: Add local struct device pointer

Use a local "struct device *dev" for brevity. No functional change
Signed-off-by: default avatarAndrey Smirnov <>
Cc: Chris Healy <>
Cc: Lucas Stach <>
Cc: Zhang Rui <>
Cc: Eduardo Valentin <>
Cc: Daniel Lezcano <>
parent 63b7eeb1
......@@ -192,8 +192,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),
if (!data)
return -ENOMEM;
......@@ -204,7 +205,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
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;
......@@ -217,7 +218,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_iomap;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment