diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-03-20 12:59:09 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-04-04 10:07:08 +0200 |
commit | 606cc43c720bdef01a22c9d221434c635139d84e (patch) | |
tree | fcb6a8c1a393aee18894191db8e5893dbf76e3a9 /drivers/rtc/class.c | |
parent | 6875404fdb44f5353ef374c7c95c7701862fe2b3 (diff) | |
download | lwn-606cc43c720bdef01a22c9d221434c635139d84e.tar.gz lwn-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/class.c')
-rw-r--r-- | drivers/rtc/class.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 22190ad28e8b..0f492b0940b3 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -20,13 +20,13 @@ #include "rtc-core.h" - static DEFINE_IDA(rtc_ida); struct class *rtc_class; static void rtc_device_release(struct device *dev) { struct rtc_device *rtc = to_rtc_device(dev); + ida_simple_remove(&rtc_ida, rtc->id); kfree(rtc); } @@ -44,7 +44,6 @@ int rtc_hctosys_ret = -ENODEV; static struct timespec64 old_rtc, old_system, old_delta; - static int rtc_suspend(struct device *dev) { struct rtc_device *rtc = to_rtc_device(dev); @@ -68,7 +67,6 @@ static int rtc_suspend(struct device *dev) ktime_get_real_ts64(&old_system); old_rtc.tv_sec = rtc_tm_to_time64(&tm); - /* * To avoid drift caused by repeated suspend/resumes, * which each can add ~1 second drift error, @@ -80,7 +78,7 @@ static int rtc_suspend(struct device *dev) if (delta_delta.tv_sec < -2 || delta_delta.tv_sec >= 2) { /* * if delta_delta is too large, assume time correction - * has occured and set old_delta to the current delta. + * has occurred and set old_delta to the current delta. */ old_delta = delta; } else { @@ -133,7 +131,7 @@ static int rtc_resume(struct device *dev) * to keep things accurate. */ sleep_time = timespec64_sub(sleep_time, - timespec64_sub(new_system, old_system)); + timespec64_sub(new_system, old_system)); if (sleep_time.tv_sec >= 0) timekeeping_inject_sleeptime64(&sleep_time); @@ -394,9 +392,9 @@ EXPORT_SYMBOL_GPL(__rtc_register_device); * rtc_register_device instead */ struct rtc_device *devm_rtc_device_register(struct device *dev, - const char *name, - const struct rtc_class_ops *ops, - struct module *owner) + const char *name, + const struct rtc_class_ops *ops, + struct module *owner) { struct rtc_device *rtc; int err; |