From 606cc43c720bdef01a22c9d221434c635139d84e Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Wed, 20 Mar 2019 12:59:09 +0100 Subject: rtc: core: correct trivial checkpatch warnings Correct trivial checkpatch warnings, mostly whitespace issues and unbalanced braces. Signed-off-by: Alexandre Belloni --- drivers/rtc/class.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'drivers/rtc/class.c') 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; -- cgit v1.2.3-55-g7522