lkml.org 
[lkml]   [2020]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 1/1] regulator: da9121: Request IRQ directly and free in release function to avoid masking race
Signed-off-by: Adam Ward <Adam.Ward.opensource@diasemi.com>
---
drivers/regulator/da9121-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121-regulator.c
index d9a8a4b..3e59f68 100644
--- a/drivers/regulator/da9121-regulator.c
+++ b/drivers/regulator/da9121-regulator.c
@@ -945,8 +945,7 @@ static int da9121_config_irq(struct i2c_client *i2c,

chip->passive_delay = p_delay;

- ret = devm_request_threaded_irq(chip->dev,
- chip->chip_irq, NULL,
+ ret = request_threaded_irq(chip->chip_irq, NULL,
da9121_irq_handler,
IRQF_TRIGGER_LOW|IRQF_ONESHOT,
"da9121", chip);
@@ -1036,6 +1035,7 @@ static int da9121_i2c_remove(struct i2c_client *i2c)
const int mask_all[4] = { 0xFF, 0xFF, 0xFF, 0xFF };
int ret = 0;

+ free_irq(chip->chip_irq, chip);
cancel_delayed_work_sync(&chip->work);

ret = regmap_bulk_write(chip->regmap, DA9121_REG_SYS_MASK_0, mask_all, 4);
--
1.9.1
\
 
 \ /
  Last update: 2020-12-01 19:20    [W:0.043 / U:4.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site