Commit 840499aa authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: lp8755: Convert to devm_request_threaded_irq

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b787f68c
...@@ -419,20 +419,16 @@ static int lp8755_int_config(struct lp8755_chip *pchip) ...@@ -419,20 +419,16 @@ static int lp8755_int_config(struct lp8755_chip *pchip)
} }
ret = lp8755_read(pchip, 0x0F, &regval); ret = lp8755_read(pchip, 0x0F, &regval);
if (ret < 0) if (ret < 0) {
goto err_i2c; dev_err(pchip->dev, "i2c acceess error %s\n", __func__);
return ret;
}
pchip->irqmask = regval; pchip->irqmask = regval;
ret = request_threaded_irq(pchip->irq, NULL, lp8755_irq_handler, return devm_request_threaded_irq(pchip->dev, pchip->irq, NULL,
lp8755_irq_handler,
IRQF_TRIGGER_FALLING | IRQF_ONESHOT, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
"lp8755-irq", pchip); "lp8755-irq", pchip);
if (ret)
return ret;
return ret;
err_i2c:
dev_err(pchip->dev, "i2c acceess error %s\n", __func__);
return ret;
} }
static const struct regmap_config lp8755_regmap = { static const struct regmap_config lp8755_regmap = {
...@@ -514,9 +510,6 @@ static int lp8755_remove(struct i2c_client *client) ...@@ -514,9 +510,6 @@ static int lp8755_remove(struct i2c_client *client)
for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++) for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
lp8755_write(pchip, icnt, 0x00); lp8755_write(pchip, icnt, 0x00);
if (pchip->irq != 0)
free_irq(pchip->irq, pchip);
return 0; return 0;
} }
......
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