提交 3e4cd073 编写于 作者: G Guennadi Liakhovetski 提交者: Paul Mundt

sh: cosmetic improvement: use an existing pointer

Use an existing local variable, instead of calculating the pointer
multiple times explicitly.
Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <damm@opensource.se>
Reviewed-by: NSimon Horman <horms@verge.net.au>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 54aa89ea
...@@ -157,7 +157,7 @@ static int default_platform_runtime_suspend(struct device *dev) ...@@ -157,7 +157,7 @@ static int default_platform_runtime_suspend(struct device *dev)
might_sleep(); might_sleep();
/* catch misconfigured drivers not starting with resume */ /* 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; ret = -EINVAL;
goto out; goto out;
} }
...@@ -170,8 +170,8 @@ static int default_platform_runtime_suspend(struct device *dev) ...@@ -170,8 +170,8 @@ static int default_platform_runtime_suspend(struct device *dev)
/* put device on idle list */ /* put device on idle list */
spin_lock_irqsave(&hwblk_lock, flags); spin_lock_irqsave(&hwblk_lock, flags);
list_add_tail(&pdev->archdata.entry, &hwblk_idle_list); list_add_tail(&ad->entry, &hwblk_idle_list);
__set_bit(PDEV_ARCHDATA_FLAG_IDLE, &pdev->archdata.flags); __set_bit(PDEV_ARCHDATA_FLAG_IDLE, &ad->flags);
spin_unlock_irqrestore(&hwblk_lock, flags); spin_unlock_irqrestore(&hwblk_lock, flags);
/* increase idle count */ /* increase idle count */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册