summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorOlliver Schinagl <oliver@schinagl.nl>2015-10-27 00:32:36 +0300
committerThierry Reding <thierry.reding@gmail.com>2015-11-10 15:06:45 +0300
commit0344d0d69b3360ec551581c141c6599a0dcb5f27 (patch)
tree84facd45567612e8b31d068aac1daef72d58696b /drivers/pwm
parentb68edac9217ef433470f78d3fb54a769ef95a45f (diff)
downloadlinux-0344d0d69b3360ec551581c141c6599a0dcb5f27.tar.xz
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: Olliver Schinagl <oliver@schinagl.nl> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/sysfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c
index c472772f00a7..ba67845b9063 100644
--- a/drivers/pwm/sysfs.c
+++ b/drivers/pwm/sysfs.c
@@ -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,