Commit f691adc3 authored by Cosmin Tanislav's avatar Cosmin Tanislav Committed by Guenter Roeck

hwmon: (adt7x10) Use devm_request_threaded_irq

To simplify the core driver remove function.
Signed-off-by: default avatarCosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20211221215841.2641417-5-demonsingur@gmail.comTested-by: default avatarCosmin Tanislav <cosmin.tanislav@analog.com>
Reviewed-by: default avatarCosmin Tanislav <cosmin.tanislav@analog.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent a748d30c
......@@ -384,9 +384,11 @@ int adt7x10_probe(struct device *dev, const char *name, int irq,
return PTR_ERR(hdev);
if (irq > 0) {
ret = request_threaded_irq(irq, NULL, adt7x10_irq_handler,
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
dev_name(dev), dev);
ret = devm_request_threaded_irq(dev, irq, NULL,
adt7x10_irq_handler,
IRQF_TRIGGER_FALLING |
IRQF_ONESHOT,
dev_name(dev), dev);
if (ret)
return ret;
}
......@@ -397,8 +399,6 @@ EXPORT_SYMBOL_GPL(adt7x10_probe);
void adt7x10_remove(struct device *dev, int irq)
{
if (irq > 0)
free_irq(irq, dev);
}
EXPORT_SYMBOL_GPL(adt7x10_remove);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment