sh: cosmetic improvement: use an existing pointer
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Fri, 15 Apr 2011 18:05:27 +0000 (18:05 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 23 May 2011 03:37:26 +0000 (12:37 +0900)
Use an existing local variable, instead of calculating the pointer
multiple times explicitly.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <damm@opensource.se>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/cpu/shmobile/pm_runtime.c

index 22db127afa7b2bd7c68973dade04117785b876de..64c807c392087c600fde506ffc36563e88532518 100644 (file)
@@ -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 */