aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2018-09-25 05:03:09 -0400
committerEduardo Valentin <edubezval@gmail.com>2018-10-22 20:50:08 -0400
commita18e83e77217b63e4138470aa49d8269a201f76d (patch)
treedd51890cbb5fb9ce6ec7b31cc7af21e8f68ea6a3
parent2cffaeff083fafeefb1daee7b443f7381eca5b2f (diff)
thermal/drivers/hisi: Remove pointless irq field
The irq field in the data structure is pointless as the scope of its usage is just to request the interrupt. It can be replaced by a local variable. Use the 'ret' variable to get the interrupt number. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
-rw-r--r--drivers/thermal/hisi_thermal.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
index 941c2c42ca79..87d8a135ad38 100644
--- a/drivers/thermal/hisi_thermal.c
+++ b/drivers/thermal/hisi_thermal.c
@@ -83,7 +83,6 @@ struct hisi_thermal_data {
83 struct clk *clk; 83 struct clk *clk;
84 void __iomem *regs; 84 void __iomem *regs;
85 int nr_sensors; 85 int nr_sensors;
86 int irq;
87}; 86};
88 87
89/* 88/*
@@ -579,16 +578,16 @@ static int hisi_thermal_probe(struct platform_device *pdev)
579 return ret; 578 return ret;
580 } 579 }
581 580
582 data->irq = platform_get_irq_byname(pdev, sensor->irq_name); 581 ret = platform_get_irq_byname(pdev, sensor->irq_name);
583 if (data->irq < 0) 582 if (ret < 0)
584 return data->irq; 583 return ret;
585 584
586 ret = devm_request_threaded_irq(dev, data->irq, NULL, 585 ret = devm_request_threaded_irq(dev, ret, NULL,
587 hisi_thermal_alarm_irq_thread, 586 hisi_thermal_alarm_irq_thread,
588 IRQF_ONESHOT, sensor->irq_name, 587 IRQF_ONESHOT, sensor->irq_name,
589 sensor); 588 sensor);
590 if (ret < 0) { 589 if (ret < 0) {
591 dev_err(dev, "failed to request alarm irq: %d\n", ret); 590 dev_err(dev, "Failed to request alarm irq: %d\n", ret);
592 return ret; 591 return ret;
593 } 592 }
594 593