summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/sysfs.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-03-20 12:59:09 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-04-04 10:07:08 +0200
commit606cc43c720bdef01a22c9d221434c635139d84e (patch)
treefcb6a8c1a393aee18894191db8e5893dbf76e3a9 /drivers/rtc/sysfs.c
parent6875404fdb44f5353ef374c7c95c7701862fe2b3 (diff)
downloadblackbird-op-linux-606cc43c720bdef01a22c9d221434c635139d84e.tar.gz
blackbird-op-linux-606cc43c720bdef01a22c9d221434c635139d84e.zip
rtc: core: correct trivial checkpatch warnings
Correct trivial checkpatch warnings, mostly whitespace issues and unbalanced braces. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/sysfs.c')
-rw-r--r--drivers/rtc/sysfs.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/rtc/sysfs.c b/drivers/rtc/sysfs.c
index 0d3dac557df5..be3531e7f868 100644
--- a/drivers/rtc/sysfs.c
+++ b/drivers/rtc/sysfs.c
@@ -11,7 +11,6 @@
#include "rtc-core.h"
-
/* device attributes */
/*
@@ -83,7 +82,7 @@ max_user_freq_show(struct device *dev, struct device_attribute *attr, char *buf)
static ssize_t
max_user_freq_store(struct device *dev, struct device_attribute *attr,
- const char *buf, size_t n)
+ const char *buf, size_t n)
{
struct rtc_device *rtc = to_rtc_device(dev);
unsigned long val;
@@ -113,12 +112,11 @@ hctosys_show(struct device *dev, struct device_attribute *attr, char *buf)
{
#ifdef CONFIG_RTC_HCTOSYS_DEVICE
if (rtc_hctosys_ret == 0 &&
- strcmp(dev_name(&to_rtc_device(dev)->dev),
- CONFIG_RTC_HCTOSYS_DEVICE) == 0)
+ strcmp(dev_name(&to_rtc_device(dev)->dev),
+ CONFIG_RTC_HCTOSYS_DEVICE) == 0)
return sprintf(buf, "1\n");
- else
#endif
- return sprintf(buf, "0\n");
+ return sprintf(buf, "0\n");
}
static DEVICE_ATTR_RO(hctosys);
@@ -172,15 +170,15 @@ wakealarm_store(struct device *dev, struct device_attribute *attr,
if (*buf_ptr == '=') {
buf_ptr++;
push = 1;
- } else
+ } else {
adjust = 1;
+ }
}
retval = kstrtos64(buf_ptr, 0, &alarm);
if (retval)
return retval;
- if (adjust) {
+ if (adjust)
alarm += now;
- }
if (alarm > now || push) {
/* Avoid accidentally clobbering active alarms; we can't
* entirely prevent that here, without even the minimal
OpenPOWER on IntegriCloud