diff mbox

[2/3] fuelgauge: max17042: Add IRQF_ONESHOT flag to use default irq handler.

Message ID 1387338834-4046-3-git-send-email-jonghwa3.lee@samsung.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Jonghwa Lee Dec. 18, 2013, 3:53 a.m. UTC
This patch adds IRQF_ONESHOT flag to max17042's irq since it uses primary
default handler. Without this flag, requesting irq will be denied with returning
error.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
---
 drivers/power/max17042_battery.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Anton Vorontsov Dec. 24, 2013, 3 a.m. UTC | #1
On Wed, Dec 18, 2013 at 12:53:53PM +0900, Jonghwa Lee wrote:
> This patch adds IRQF_ONESHOT flag to max17042's irq since it uses primary
> default handler. Without this flag, requesting irq will be denied with returning
> error.
> 
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> ---

Applied, thanks!

>  drivers/power/max17042_battery.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
> index bbb2e01..c611ce7 100644
> --- a/drivers/power/max17042_battery.c
> +++ b/drivers/power/max17042_battery.c
> @@ -710,9 +710,9 @@ static int max17042_probe(struct i2c_client *client,
>  
>  	if (client->irq) {
>  		ret = request_threaded_irq(client->irq, NULL,
> -						max17042_thread_handler,
> -						IRQF_TRIGGER_FALLING,
> -						chip->battery.name, chip);
> +					max17042_thread_handler,
> +					IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
> +					chip->battery.name, chip);
>  		if (!ret) {
>  			regmap_read(chip->regmap, MAX17042_CONFIG, &val);
>  			val |= CONFIG_ALRT_BIT_ENBL;
> -- 
> 1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
index bbb2e01..c611ce7 100644
--- a/drivers/power/max17042_battery.c
+++ b/drivers/power/max17042_battery.c
@@ -710,9 +710,9 @@  static int max17042_probe(struct i2c_client *client,
 
 	if (client->irq) {
 		ret = request_threaded_irq(client->irq, NULL,
-						max17042_thread_handler,
-						IRQF_TRIGGER_FALLING,
-						chip->battery.name, chip);
+					max17042_thread_handler,
+					IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
+					chip->battery.name, chip);
 		if (!ret) {
 			regmap_read(chip->regmap, MAX17042_CONFIG, &val);
 			val |= CONFIG_ALRT_BIT_ENBL;