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>hifive-unleashed-5.1
parent
2cffaeff08
commit
a18e83e772
|
@ -83,7 +83,6 @@ struct hisi_thermal_data {
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
void __iomem *regs;
|
void __iomem *regs;
|
||||||
int nr_sensors;
|
int nr_sensors;
|
||||||
int irq;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -579,16 +578,16 @@ static int hisi_thermal_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
data->irq = platform_get_irq_byname(pdev, sensor->irq_name);
|
ret = platform_get_irq_byname(pdev, sensor->irq_name);
|
||||||
if (data->irq < 0)
|
if (ret < 0)
|
||||||
return data->irq;
|
return ret;
|
||||||
|
|
||||||
ret = devm_request_threaded_irq(dev, data->irq, NULL,
|
ret = devm_request_threaded_irq(dev, ret, NULL,
|
||||||
hisi_thermal_alarm_irq_thread,
|
hisi_thermal_alarm_irq_thread,
|
||||||
IRQF_ONESHOT, sensor->irq_name,
|
IRQF_ONESHOT, sensor->irq_name,
|
||||||
sensor);
|
sensor);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(dev, "failed to request alarm irq: %d\n", ret);
|
dev_err(dev, "Failed to request alarm irq: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue