diff options
author | Cosmin Tanislav | 2021-12-21 23:58:38 +0200 |
---|---|---|
committer | Guenter Roeck | 2022-02-27 17:03:18 -0800 |
commit | f691adc3e95ecd6ae01830f7f6140dce3bd730a2 (patch) | |
tree | bd0996167d5f29fd2e2bc3d3b37b2afb28afe407 /drivers/hwmon | |
parent | a748d30c37bb7d238e5869f4f4d6037367493ebe (diff) |
hwmon: (adt7x10) Use devm_request_threaded_irq
To simplify the core driver remove function.
Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20211221215841.2641417-5-demonsingur@gmail.com
Tested-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Reviewed-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/adt7x10.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/adt7x10.c b/drivers/hwmon/adt7x10.c index 9482fd8fff41..147c28b24167 100644 --- a/drivers/hwmon/adt7x10.c +++ b/drivers/hwmon/adt7x10.c @@ -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); |