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/dev.c | |
parent | 6875404fdb44f5353ef374c7c95c7701862fe2b3 (diff) | |
download | linux-606cc43c720bdef01a22c9d221434c635139d84e.tar.gz linux-606cc43c720bdef01a22c9d221434c635139d84e.tar.bz2 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/dev.c')
-rw-r--r-- | drivers/rtc/dev.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/rtc/dev.c b/drivers/rtc/dev.c index f68aae035b81..84feb2565abd 100644 --- a/drivers/rtc/dev.c +++ b/drivers/rtc/dev.c @@ -57,7 +57,7 @@ static void rtc_uie_task(struct work_struct *work) } else if (rtc->oldsecs != tm.tm_sec) { num = (tm.tm_sec + 60 - rtc->oldsecs) % 60; rtc->oldsecs = tm.tm_sec; - rtc->uie_timer.expires = jiffies + HZ - (HZ/10); + rtc->uie_timer.expires = jiffies + HZ - (HZ / 10); rtc->uie_timer_active = 1; rtc->uie_task_active = 0; add_timer(&rtc->uie_timer); @@ -68,6 +68,7 @@ static void rtc_uie_task(struct work_struct *work) if (num) rtc_handle_legacy_irq(rtc, num, RTC_UF); } + static void rtc_uie_timer(struct timer_list *t) { struct rtc_device *rtc = from_timer(rtc, t, uie_timer); @@ -199,14 +200,14 @@ static __poll_t rtc_dev_poll(struct file *file, poll_table *wait) } static long rtc_dev_ioctl(struct file *file, - unsigned int cmd, unsigned long arg) + unsigned int cmd, unsigned long arg) { int err = 0; struct rtc_device *rtc = file->private_data; const struct rtc_class_ops *ops = rtc->ops; struct rtc_time tm; struct rtc_wkalrm alarm; - void __user *uarg = (void __user *) arg; + void __user *uarg = (void __user *)arg; err = mutex_lock_interruptible(&rtc->ops_lock); if (err) @@ -230,7 +231,7 @@ static long rtc_dev_ioctl(struct file *file, case RTC_PIE_ON: if (rtc->irq_freq > rtc->max_user_freq && - !capable(CAP_SYS_RESOURCE)) + !capable(CAP_SYS_RESOURCE)) err = -EACCES; break; } @@ -387,8 +388,9 @@ static long rtc_dev_ioctl(struct file *file, err = ops->ioctl(rtc->dev.parent, cmd, arg); if (err == -ENOIOCTLCMD) err = -ENOTTY; - } else + } else { err = -ENOTTY; + } break; } @@ -400,6 +402,7 @@ done: static int rtc_dev_fasync(int fd, struct file *file, int on) { struct rtc_device *rtc = file->private_data; + return fasync_helper(fd, file, on, &rtc->async_queue); } |