diff options
author | Stephan Gerhold <stephan@gerhold.net> | 2021-05-31 15:34:33 +0200 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2021-06-21 18:28:00 +0900 |
commit | d3a213d23c5248f40986cbf8699c755c204ba90e (patch) | |
tree | ba8e61ec35229e52252bca2c3946962c6cc52af9 /drivers/extcon | |
parent | dc11fc2991e9efbceef93912b83e333d2835fb19 (diff) |
extcon: sm5502: Use devm_regmap_add_irq_chip()
Use devm_regmap_add_irq_chip() to avoid having to remove the
irqchip explicitly in sm5502_muic_i2c_remove().
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-sm5502.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c index c3e4b220e66f..a1040c929237 100644 --- a/drivers/extcon/extcon-sm5502.c +++ b/drivers/extcon/extcon-sm5502.c @@ -599,8 +599,8 @@ static int sm5022_muic_i2c_probe(struct i2c_client *i2c, /* Support irq domain for SM5502 MUIC device */ irq_flags = IRQF_TRIGGER_FALLING | IRQF_ONESHOT | IRQF_SHARED; - ret = regmap_add_irq_chip(info->regmap, info->irq, irq_flags, 0, - &sm5502_muic_irq_chip, &info->irq_data); + ret = devm_regmap_add_irq_chip(info->dev, info->regmap, info->irq, irq_flags, + 0, &sm5502_muic_irq_chip, &info->irq_data); if (ret != 0) { dev_err(info->dev, "failed to request IRQ %d: %d\n", info->irq, ret); @@ -660,15 +660,6 @@ static int sm5022_muic_i2c_probe(struct i2c_client *i2c, return 0; } -static int sm5502_muic_i2c_remove(struct i2c_client *i2c) -{ - struct sm5502_muic_info *info = i2c_get_clientdata(i2c); - - regmap_del_irq_chip(info->irq, info->irq_data); - - return 0; -} - static const struct of_device_id sm5502_dt_match[] = { { .compatible = "siliconmitus,sm5502-muic" }, { }, @@ -713,7 +704,6 @@ static struct i2c_driver sm5502_muic_i2c_driver = { .of_match_table = sm5502_dt_match, }, .probe = sm5022_muic_i2c_probe, - .remove = sm5502_muic_i2c_remove, .id_table = sm5502_i2c_id, }; |