X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fpower%2Ftwl4030_bci_battery.c;h=a36eaae3670bf26fd7911087b06717ac51e067c9;hb=baae8496943a8a2cb141f28c005ee5e6d6b19bbc;hp=72a018ba4a3eb6e7f7d19ad09b0c522960787e3c;hpb=85c0074e097432263d4ad5bba44b9026aa7bda4b;p=linux-2.6-omap-h63xx.git diff --git a/drivers/power/twl4030_bci_battery.c b/drivers/power/twl4030_bci_battery.c index 72a018ba4a3..a36eaae3670 100644 --- a/drivers/power/twl4030_bci_battery.c +++ b/drivers/power/twl4030_bci_battery.c @@ -210,6 +210,14 @@ static irqreturn_t twl4030charger_interrupt(int irq, void *_di) { struct twl4030_bci_device_info *di = _di; +#ifdef CONFIG_LOCKDEP + /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which + * we don't want and can't tolerate. Although it might be + * friendlier not to borrow this thread context... + */ + local_irq_enable(); +#endif + twl4030charger_presence_evt(); power_supply_changed(&di->bat); @@ -310,6 +318,14 @@ static irqreturn_t twl4030battery_interrupt(int irq, void *_di) u8 isr1a_val, isr2a_val, clear_2a, clear_1a; int ret; +#ifdef CONFIG_LOCKDEP + /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which + * we don't want and can't tolerate. Although it might be + * friendlier not to borrow this thread context... + */ + local_irq_enable(); +#endif + ret = twl4030_i2c_read_u8(TWL4030_MODULE_INTERRUPTS, &isr1a_val, REG_BCIISR1A); if (ret) @@ -943,7 +959,7 @@ static int __init twl4030_bci_battery_probe(struct platform_device *pdev) /* request BCI interruption */ ret = request_irq(TWL4030_MODIRQ_BCI, twl4030battery_interrupt, - IRQF_DISABLED, pdev->name, NULL); + 0, pdev->name, NULL); if (ret) { dev_dbg(&pdev->dev, "could not request irq %d, status %d\n", TWL4030_MODIRQ_BCI, ret);