mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
rtc: remove struct rtc_task
Include rtc_task members directly in rtc_timer member. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
f7430151d8
commit
5a5ba10f44
@ -912,8 +912,8 @@ again:
|
||||
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;
|
||||
}
|
||||
|
||||
/* rtc_timer_start - Sets an rtc_timer to fire in the future
|
||||
|
@ -87,16 +87,11 @@ struct rtc_class_ops {
|
||||
int (*set_offset)(struct device *, long offset);
|
||||
};
|
||||
|
||||
typedef struct rtc_task {
|
||||
void (*func)(void *private_data);
|
||||
void *private_data;
|
||||
} rtc_task_t;
|
||||
|
||||
|
||||
struct rtc_timer {
|
||||
struct rtc_task task;
|
||||
struct timerqueue_node node;
|
||||
ktime_t period;
|
||||
void (*func)(void *private_data);
|
||||
void *private_data;
|
||||
int enabled;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user