summaryrefslogtreecommitdiff
path: root/drivers/pwm/sysfs.c
diff options
context:
space:
mode:
authorOlliver Schinagl <oliver@schinagl.nl>2015-10-26 22:32:36 +0100
committerThierry Reding <thierry.reding@gmail.com>2015-11-10 13:06:45 +0100
commit0344d0d69b3360ec551581c141c6599a0dcb5f27 (patch)
tree84facd45567612e8b31d068aac1daef72d58696b /drivers/pwm/sysfs.c
parentb68edac9217ef433470f78d3fb54a769ef95a45f (diff)
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/sysfs.c')
-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,