drivers/rtc/interface.c: fix checkpatch errors

Fixes the following types of errors:
  ERROR: "foo* bar" should be "foo *bar"
  ERROR: else should follow close brace '}'
  WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Sachin Kamat 2013-07-03 15:05:42 -07:00 committed by Linus Torvalds
parent d8d5290a32
commit 3ff2e13ce1

View File

@ -109,9 +109,9 @@ int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs)
err = rtc->ops->set_time(rtc->dev.parent, err = rtc->ops->set_time(rtc->dev.parent,
&new); &new);
} }
} } else {
else
err = -EINVAL; err = -EINVAL;
}
mutex_unlock(&rtc->ops_lock); mutex_unlock(&rtc->ops_lock);
/* A timer might have just expired */ /* A timer might have just expired */
@ -367,14 +367,14 @@ int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
err = mutex_lock_interruptible(&rtc->ops_lock); err = mutex_lock_interruptible(&rtc->ops_lock);
if (err) if (err)
return err; return err;
if (rtc->aie_timer.enabled) { if (rtc->aie_timer.enabled)
rtc_timer_remove(rtc, &rtc->aie_timer); rtc_timer_remove(rtc, &rtc->aie_timer);
}
rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time);
rtc->aie_timer.period = ktime_set(0, 0); rtc->aie_timer.period = ktime_set(0, 0);
if (alarm->enabled) { if (alarm->enabled)
err = rtc_timer_enqueue(rtc, &rtc->aie_timer); err = rtc_timer_enqueue(rtc, &rtc->aie_timer);
}
mutex_unlock(&rtc->ops_lock); mutex_unlock(&rtc->ops_lock);
return err; return err;
} }
@ -891,7 +891,7 @@ again:
* *
* Kernel interface to initializing an rtc_timer. * Kernel interface to initializing an rtc_timer.
*/ */
void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data) void rtc_timer_init(struct rtc_timer *timer, void (*f)(void *p), void *data)
{ {
timerqueue_init(&timer->node); timerqueue_init(&timer->node);
timer->enabled = 0; timer->enabled = 0;
@ -907,7 +907,7 @@ void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data)
* *
* Kernel interface to set an rtc_timer * Kernel interface to set an rtc_timer
*/ */
int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer, int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer *timer,
ktime_t expires, ktime_t period) ktime_t expires, ktime_t period)
{ {
int ret = 0; int ret = 0;
@ -930,7 +930,7 @@ int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer,
* *
* Kernel interface to cancel an rtc_timer * Kernel interface to cancel an rtc_timer
*/ */
int rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer* timer) int rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer)
{ {
int ret = 0; int ret = 0;
mutex_lock(&rtc->ops_lock); mutex_lock(&rtc->ops_lock);