projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b68edac
)
pwm: sysfs: Remove unnecessary temporary variable
author
Olliver Schinagl
<oliver@schinagl.nl>
Mon, 26 Oct 2015 21:32:36 +0000
(22:32 +0100)
committer
Thierry Reding
<thierry.reding@gmail.com>
Tue, 10 Nov 2015 12:06:45 +0000
(13:06 +0100)
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>
drivers/pwm/sysfs.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/pwm/sysfs.c
b/drivers/pwm/sysfs.c
index c472772f00a7880611e23e62cfbd1731d04dfa27..ba67845b9063b599277a40c89db5268fbe6abe13 100644
(file)
--- 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,