lkml.org 
[lkml]   [2018]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 8/8] rtc: remove struct rtc_task
On Thu, Jul 26, 2018 at 3:42 PM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> Include rtc_task members directly in rtc_timer member.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
> drivers/rtc/interface.c | 8 ++++----
> include/linux/rtc.h | 9 ++-------
> 2 files changed, 6 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
> index d0983ed6c842..a962540faf2e 100644
> --- a/drivers/rtc/interface.c
> +++ b/drivers/rtc/interface.c
> @@ -912,8 +912,8 @@ void rtc_timer_do_work(struct work_struct *work)
> timerqueue_del(&rtc->timerqueue, &timer->node);
> trace_rtc_timer_dequeue(timer);
> timer->enabled = 0;
> - if (timer->task.func)
> - timer->task.func(timer->task.private_data);
> + if (timer->func)
> + timer->func(timer->private_data);
>
> trace_rtc_timer_fired(timer);
> /* Re-add/fwd periodic timers */
> @@ -968,8 +968,8 @@ void rtc_timer_init(struct rtc_timer *timer, void (*f)(void *p), void *data)
> {
> timerqueue_init(&timer->node);
> timer->enabled = 0;
> - timer->task.func = f;
> - timer->task.private_data = data;
> + timer->func = f;
> + timer->private_data = data;
> }

From what I can see, all remaining users pass the rtc_device pointer as
'private_data', so maybe make that explicit now instead of the void pointer?

Arnd

\
 
 \ /
  Last update: 2018-08-06 11:07    [W:0.083 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site