aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/tps65010.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/mfd/tps65010.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'drivers/mfd/tps65010.c')
-rw-r--r--drivers/mfd/tps65010.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c
index d0016b67d125..93d5fdf020c7 100644
--- a/drivers/mfd/tps65010.c
+++ b/drivers/mfd/tps65010.c
@@ -34,7 +34,7 @@
34 34
35#include <linux/i2c/tps65010.h> 35#include <linux/i2c/tps65010.h>
36 36
37#include <asm/gpio.h> 37#include <linux/gpio.h>
38 38
39 39
40/*-------------------------------------------------------------------------*/ 40/*-------------------------------------------------------------------------*/
@@ -242,7 +242,7 @@ static int dbg_show(struct seq_file *s, void *_)
242 seq_printf(s, "mask2 %s\n", buf); 242 seq_printf(s, "mask2 %s\n", buf);
243 /* ignore ackint2 */ 243 /* ignore ackint2 */
244 244
245 (void) schedule_delayed_work(&tps->work, POWER_POLL_DELAY); 245 schedule_delayed_work(&tps->work, POWER_POLL_DELAY);
246 246
247 247
248 /* VMAIN voltage, enable lowpower, etc */ 248 /* VMAIN voltage, enable lowpower, etc */
@@ -400,7 +400,7 @@ static void tps65010_interrupt(struct tps65010 *tps)
400 && (tps->chgstatus & (TPS_CHG_USB|TPS_CHG_AC))) 400 && (tps->chgstatus & (TPS_CHG_USB|TPS_CHG_AC)))
401 poll = 1; 401 poll = 1;
402 if (poll) 402 if (poll)
403 (void) schedule_delayed_work(&tps->work, POWER_POLL_DELAY); 403 schedule_delayed_work(&tps->work, POWER_POLL_DELAY);
404 404
405 /* also potentially gpio-in rise or fall */ 405 /* also potentially gpio-in rise or fall */
406} 406}
@@ -410,7 +410,7 @@ static void tps65010_work(struct work_struct *work)
410{ 410{
411 struct tps65010 *tps; 411 struct tps65010 *tps;
412 412
413 tps = container_of(work, struct tps65010, work.work); 413 tps = container_of(to_delayed_work(work), struct tps65010, work);
414 mutex_lock(&tps->lock); 414 mutex_lock(&tps->lock);
415 415
416 tps65010_interrupt(tps); 416 tps65010_interrupt(tps);
@@ -448,7 +448,7 @@ static irqreturn_t tps65010_irq(int irq, void *_tps)
448 448
449 disable_irq_nosync(irq); 449 disable_irq_nosync(irq);
450 set_bit(FLAG_IRQ_ENABLE, &tps->flags); 450 set_bit(FLAG_IRQ_ENABLE, &tps->flags);
451 (void) schedule_work(&tps->work.work); 451 schedule_delayed_work(&tps->work, 0);
452 return IRQ_HANDLED; 452 return IRQ_HANDLED;
453} 453}
454 454
@@ -527,8 +527,7 @@ static int __exit tps65010_remove(struct i2c_client *client)
527 } 527 }
528 if (client->irq > 0) 528 if (client->irq > 0)
529 free_irq(client->irq, tps); 529 free_irq(client->irq, tps);
530 cancel_delayed_work(&tps->work); 530 cancel_delayed_work_sync(&tps->work);
531 flush_scheduled_work();
532 debugfs_remove(tps->file); 531 debugfs_remove(tps->file);
533 kfree(tps); 532 kfree(tps);
534 the_tps = NULL; 533 the_tps = NULL;
@@ -720,7 +719,7 @@ int tps65010_set_vbus_draw(unsigned mA)
720 && test_and_set_bit( 719 && test_and_set_bit(
721 FLAG_VBUS_CHANGED, &the_tps->flags)) { 720 FLAG_VBUS_CHANGED, &the_tps->flags)) {
722 /* gadget drivers call this in_irq() */ 721 /* gadget drivers call this in_irq() */
723 (void) schedule_work(&the_tps->work.work); 722 schedule_delayed_work(&the_tps->work, 0);
724 } 723 }
725 local_irq_restore(flags); 724 local_irq_restore(flags);
726 725