diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 19:58:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 19:58:04 -0500 |
commit | 23d69b09b78c4876e134f104a3814c30747c53f1 (patch) | |
tree | 40744de4f4126c21027ce537264524095e0e7979 /drivers/mmc | |
parent | e744070fd4ff9d3114277e52d77afa21579adce2 (diff) | |
parent | 569ff2de2e1c8ac67c8df3a7367d46d0d9460a35 (diff) |
Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
* 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (33 commits)
usb: don't use flush_scheduled_work()
speedtch: don't abuse struct delayed_work
media/video: don't use flush_scheduled_work()
media/video: explicitly flush request_module work
ioc4: use static work_struct for ioc4_load_modules()
init: don't call flush_scheduled_work() from do_initcalls()
s390: don't use flush_scheduled_work()
rtc: don't use flush_scheduled_work()
mmc: update workqueue usages
mfd: update workqueue usages
dvb: don't use flush_scheduled_work()
leds-wm8350: don't use flush_scheduled_work()
mISDN: don't use flush_scheduled_work()
macintosh/ams: don't use flush_scheduled_work()
vmwgfx: don't use flush_scheduled_work()
tpm: don't use flush_scheduled_work()
sonypi: don't use flush_scheduled_work()
hvsi: don't use flush_scheduled_work()
xen: don't use flush_scheduled_work()
gdrom: don't use flush_scheduled_work()
...
Fixed up trivial conflict in drivers/media/video/bt8xx/bttv-input.c
as per Tejun.
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/core.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/omap.c | 24 | ||||
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 2 |
3 files changed, 20 insertions, 8 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 57dcf8fa774a..a3a780faf85a 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -1790,7 +1790,7 @@ static int __init mmc_init(void) | |||
1790 | { | 1790 | { |
1791 | int ret; | 1791 | int ret; |
1792 | 1792 | ||
1793 | workqueue = create_singlethread_workqueue("kmmcd"); | 1793 | workqueue = alloc_ordered_workqueue("kmmcd", 0); |
1794 | if (!workqueue) | 1794 | if (!workqueue) |
1795 | return -ENOMEM; | 1795 | return -ENOMEM; |
1796 | 1796 | ||
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 0c7e37f496ef..379d2ffe4c87 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -173,6 +173,8 @@ struct mmc_omap_host { | |||
173 | struct omap_mmc_platform_data *pdata; | 173 | struct omap_mmc_platform_data *pdata; |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static struct workqueue_struct *mmc_omap_wq; | ||
177 | |||
176 | static void mmc_omap_fclk_offdelay(struct mmc_omap_slot *slot) | 178 | static void mmc_omap_fclk_offdelay(struct mmc_omap_slot *slot) |
177 | { | 179 | { |
178 | unsigned long tick_ns; | 180 | unsigned long tick_ns; |
@@ -289,7 +291,7 @@ static void mmc_omap_release_slot(struct mmc_omap_slot *slot, int clk_enabled) | |||
289 | host->next_slot = new_slot; | 291 | host->next_slot = new_slot; |
290 | host->mmc = new_slot->mmc; | 292 | host->mmc = new_slot->mmc; |
291 | spin_unlock_irqrestore(&host->slot_lock, flags); | 293 | spin_unlock_irqrestore(&host->slot_lock, flags); |
292 | schedule_work(&host->slot_release_work); | 294 | queue_work(mmc_omap_wq, &host->slot_release_work); |
293 | return; | 295 | return; |
294 | } | 296 | } |
295 | 297 | ||
@@ -457,7 +459,7 @@ mmc_omap_xfer_done(struct mmc_omap_host *host, struct mmc_data *data) | |||
457 | } | 459 | } |
458 | 460 | ||
459 | host->stop_data = data; | 461 | host->stop_data = data; |
460 | schedule_work(&host->send_stop_work); | 462 | queue_work(mmc_omap_wq, &host->send_stop_work); |
461 | } | 463 | } |
462 | 464 | ||
463 | static void | 465 | static void |
@@ -637,7 +639,7 @@ mmc_omap_cmd_timer(unsigned long data) | |||
637 | OMAP_MMC_WRITE(host, IE, 0); | 639 | OMAP_MMC_WRITE(host, IE, 0); |
638 | disable_irq(host->irq); | 640 | disable_irq(host->irq); |
639 | host->abort = 1; | 641 | host->abort = 1; |
640 | schedule_work(&host->cmd_abort_work); | 642 | queue_work(mmc_omap_wq, &host->cmd_abort_work); |
641 | } | 643 | } |
642 | spin_unlock_irqrestore(&host->slot_lock, flags); | 644 | spin_unlock_irqrestore(&host->slot_lock, flags); |
643 | } | 645 | } |
@@ -826,7 +828,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) | |||
826 | host->abort = 1; | 828 | host->abort = 1; |
827 | OMAP_MMC_WRITE(host, IE, 0); | 829 | OMAP_MMC_WRITE(host, IE, 0); |
828 | disable_irq_nosync(host->irq); | 830 | disable_irq_nosync(host->irq); |
829 | schedule_work(&host->cmd_abort_work); | 831 | queue_work(mmc_omap_wq, &host->cmd_abort_work); |
830 | return IRQ_HANDLED; | 832 | return IRQ_HANDLED; |
831 | } | 833 | } |
832 | 834 | ||
@@ -1387,7 +1389,7 @@ static void mmc_omap_remove_slot(struct mmc_omap_slot *slot) | |||
1387 | 1389 | ||
1388 | tasklet_kill(&slot->cover_tasklet); | 1390 | tasklet_kill(&slot->cover_tasklet); |
1389 | del_timer_sync(&slot->cover_timer); | 1391 | del_timer_sync(&slot->cover_timer); |
1390 | flush_scheduled_work(); | 1392 | flush_workqueue(mmc_omap_wq); |
1391 | 1393 | ||
1392 | mmc_remove_host(mmc); | 1394 | mmc_remove_host(mmc); |
1393 | mmc_free_host(mmc); | 1395 | mmc_free_host(mmc); |
@@ -1608,12 +1610,22 @@ static struct platform_driver mmc_omap_driver = { | |||
1608 | 1610 | ||
1609 | static int __init mmc_omap_init(void) | 1611 | static int __init mmc_omap_init(void) |
1610 | { | 1612 | { |
1611 | return platform_driver_probe(&mmc_omap_driver, mmc_omap_probe); | 1613 | int ret; |
1614 | |||
1615 | mmc_omap_wq = alloc_workqueue("mmc_omap", 0, 0); | ||
1616 | if (!mmc_omap_wq) | ||
1617 | return -ENOMEM; | ||
1618 | |||
1619 | ret = platform_driver_probe(&mmc_omap_driver, mmc_omap_probe); | ||
1620 | if (ret) | ||
1621 | destroy_workqueue(mmc_omap_wq); | ||
1622 | return ret; | ||
1612 | } | 1623 | } |
1613 | 1624 | ||
1614 | static void __exit mmc_omap_exit(void) | 1625 | static void __exit mmc_omap_exit(void) |
1615 | { | 1626 | { |
1616 | platform_driver_unregister(&mmc_omap_driver); | 1627 | platform_driver_unregister(&mmc_omap_driver); |
1628 | destroy_workqueue(mmc_omap_wq); | ||
1617 | } | 1629 | } |
1618 | 1630 | ||
1619 | module_init(mmc_omap_init); | 1631 | module_init(mmc_omap_init); |
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 5d46021cbb57..078fdf11af03 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -2290,7 +2290,7 @@ static int omap_hsmmc_remove(struct platform_device *pdev) | |||
2290 | free_irq(host->irq, host); | 2290 | free_irq(host->irq, host); |
2291 | if (mmc_slot(host).card_detect_irq) | 2291 | if (mmc_slot(host).card_detect_irq) |
2292 | free_irq(mmc_slot(host).card_detect_irq, host); | 2292 | free_irq(mmc_slot(host).card_detect_irq, host); |
2293 | flush_scheduled_work(); | 2293 | flush_work_sync(&host->mmc_carddetect_work); |
2294 | 2294 | ||
2295 | mmc_host_disable(host->mmc); | 2295 | mmc_host_disable(host->mmc); |
2296 | clk_disable(host->iclk); | 2296 | clk_disable(host->iclk); |