提交 0344d0d6 编写于 作者: O Olliver Schinagl 提交者: Thierry Reding

pwm: sysfs: Remove unnecessary temporary variable

Use the result of pwm_is_enabled() directly instead of storing it in a
temporary variable.
Signed-off-by: NOlliver Schinagl <oliver@schinagl.nl>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 b68edac9
......@@ -97,9 +97,8 @@ static ssize_t pwm_enable_show(struct device *child,
char *buf)
{
const struct pwm_device *pwm = child_to_pwm_device(child);
int enabled = pwm_is_enabled(pwm);
return sprintf(buf, "%d\n", enabled);
return sprintf(buf, "%d\n", pwm_is_enabled(pwm));
}
static ssize_t pwm_enable_store(struct device *child,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册