projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a748d30
)
hwmon: (adt7x10) Use devm_request_threaded_irq
author
Cosmin Tanislav
<cosmin.tanislav@analog.com>
Tue, 21 Dec 2021 21:58:38 +0000
(23:58 +0200)
committer
Guenter Roeck
<linux@roeck-us.net>
Mon, 28 Feb 2022 01:03:18 +0000
(17:03 -0800)
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>
drivers/hwmon/adt7x10.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/adt7x10.c
b/drivers/hwmon/adt7x10.c
index 9482fd8fff41f2d22f02d9e23507f4b7dd0308b7..147c28b241675b1d9b08dd5aabe3e6a6063f0b6b 100644
(file)
--- 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);