Skip to content

Commit

Permalink
video/exynos: don't use [delayed_]work_pending()
Browse files Browse the repository at this point in the history
There's no need to test whether a (delayed) work item in pending
before queueing, flushing or cancelling it.  Most uses are unnecessary
and quite a few of them are buggy.

Remove unnecessary pending tests from exynos_dp_core.  Only compile
tested.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
  • Loading branch information
htejun committed Dec 28, 2012
1 parent 7998005 commit 7d0315a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/video/exynos/exynos_dp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1121,8 +1121,7 @@ static int __devexit exynos_dp_remove(struct platform_device *pdev)

disable_irq(dp->irq);

if (work_pending(&dp->hotplug_work))
flush_work(&dp->hotplug_work);
flush_work(&dp->hotplug_work);

if (pdev->dev.of_node) {
if (dp->phy_addr)
Expand All @@ -1144,8 +1143,7 @@ static int exynos_dp_suspend(struct device *dev)
struct exynos_dp_platdata *pdata = dev->platform_data;
struct exynos_dp_device *dp = dev_get_drvdata(dev);

if (work_pending(&dp->hotplug_work))
flush_work(&dp->hotplug_work);
flush_work(&dp->hotplug_work);

if (dev->of_node) {
if (dp->phy_addr)
Expand Down

0 comments on commit 7d0315a

Please sign in to comment.