From 3e4cd0737d2e9c3dd52153a23aef1753e3a99fc4 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 15 Apr 2011 18:05:27 +0000 Subject: [PATCH] sh: cosmetic improvement: use an existing pointer Use an existing local variable, instead of calculating the pointer multiple times explicitly. Signed-off-by: Guennadi Liakhovetski Cc: Simon Horman Cc: Magnus Damm Reviewed-by: Simon Horman Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/shmobile/pm_runtime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sh/kernel/cpu/shmobile/pm_runtime.c b/arch/sh/kernel/cpu/shmobile/pm_runtime.c index 22db127afa7..64c807c3920 100644 --- a/arch/sh/kernel/cpu/shmobile/pm_runtime.c +++ b/arch/sh/kernel/cpu/shmobile/pm_runtime.c @@ -157,7 +157,7 @@ static int default_platform_runtime_suspend(struct device *dev) might_sleep(); /* catch misconfigured drivers not starting with resume */ - if (test_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags)) { + if (test_bit(PDEV_ARCHDATA_FLAG_INIT, &ad->flags)) { ret = -EINVAL; goto out; } @@ -170,8 +170,8 @@ static int default_platform_runtime_suspend(struct device *dev) /* put device on idle list */ spin_lock_irqsave(&hwblk_lock, flags); - list_add_tail(&pdev->archdata.entry, &hwblk_idle_list); - __set_bit(PDEV_ARCHDATA_FLAG_IDLE, &pdev->archdata.flags); + list_add_tail(&ad->entry, &hwblk_idle_list); + __set_bit(PDEV_ARCHDATA_FLAG_IDLE, &ad->flags); spin_unlock_irqrestore(&hwblk_lock, flags); /* increase idle count */ -- 2.20.1