Skip to content

Commit

Permalink
sh: cosmetic improvement: use an existing pointer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guennadi Liakhovetski authored and Paul Mundt committed May 23, 2011
1 parent 54aa89e commit 3e4cd07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/sh/kernel/cpu/shmobile/pm_runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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 */
Expand Down

0 comments on commit 3e4cd07

Please sign in to comment.