k1:soc-timer: fix compling error

error like this blow:

drivers/clocksource/timer-k1x.c:302:12: error: conflicting types for 'timer_shutdown'; have 'int(struct clock_event_device *)'
  302 | static int timer_shutdown(struct clock_event_device *dev)
      |            ^~~~~~~~~~~~~~
In file included from ./include/linux/workqueue.h:9,
                 from ./include/linux/rhashtable-types.h:15,
                 from ./include/linux/ipc.h:7,
                 from ./include/uapi/linux/sem.h:5,
                 from ./include/linux/sem.h:5,
                 from ./include/linux/sched.h:15,
                 from ./include/linux/hardirq.h:9,
                 from ./include/linux/interrupt.h:11,
                 from drivers/clocksource/timer-k1x.c:10:
./include/linux/timer.h:188:12: note: previous declaration of 'timer_shutdown' with type 'int(struct timer_list *)'
  188 | extern int timer_shutdown(struct timer_list *timer);

Change-Id: I2ee903478e121f0428d7820bcd47025d0fe37c8b
Signed-off-by: Nell <xianbin.zhu@spacemit.com>
This commit is contained in:
Nell
2025-03-22 13:01:08 +08:00
committed by 张猛
parent 2018056833
commit 51935b0360

View File

@@ -299,7 +299,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
return IRQ_NONE;
}
static int timer_shutdown(struct clock_event_device *dev)
static int timer_set_shutdown(struct clock_event_device *dev)
{
struct spacemit_timer_evt *evt;
unsigned long flags;
@@ -524,7 +524,7 @@ int __init spacemit_timer_setup(struct spacemit_timer_evt *evt)
evt->ced.features = CLOCK_EVT_FEAT_ONESHOT;
evt->ced.rating = 200;
evt->ced.set_next_event = timer_set_next_event;
evt->ced.set_state_shutdown = timer_shutdown;
evt->ced.set_state_shutdown = timer_set_shutdown;
evt->ced.tick_resume = timer_resume;
evt->ced.irq = evt->irq;