Skip to content

Commit a18e83e

Browse files
dlezcanoEduardo Valentin
authored andcommitted
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>
1 parent 2cffaef commit a18e83e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

drivers/thermal/hisi_thermal.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ struct hisi_thermal_data {
8383
struct clk *clk;
8484
void __iomem *regs;
8585
int nr_sensors;
86-
int irq;
8786
};
8887

8988
/*
@@ -579,16 +578,16 @@ static int hisi_thermal_probe(struct platform_device *pdev)
579578
return ret;
580579
}
581580

582-
data->irq = platform_get_irq_byname(pdev, sensor->irq_name);
583-
if (data->irq < 0)
584-
return data->irq;
581+
ret = platform_get_irq_byname(pdev, sensor->irq_name);
582+
if (ret < 0)
583+
return ret;
585584

586-
ret = devm_request_threaded_irq(dev, data->irq, NULL,
585+
ret = devm_request_threaded_irq(dev, ret, NULL,
587586
hisi_thermal_alarm_irq_thread,
588587
IRQF_ONESHOT, sensor->irq_name,
589588
sensor);
590589
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);
592591
return ret;
593592
}
594593

0 commit comments

Comments
 (0)