Message ID | CAKohpo=0cG1Bo8NgcrMVTLo=bDnUoD-R8fY5XKT=22X8bzRv2A@mail.gmail.com |
---|---|
State | New |
Headers | show |
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index e646fbe44b05..75d221c7e9cc 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -444,8 +444,12 @@ EXPORT_SYMBOL_GPL(clockevents_unbind); static int clockevents_sanity_check(struct clock_event_device *dev) { /* Legacy set_mode() callback */ - if (dev->set_mode) + if (dev->set_mode) { + /* We shouldn't be supporting new modes now */ + WARN_ON(dev->set_mode_periodic || dev->set_mode_oneshot || + dev->set_mode_shutdown || dev->set_mode_resume); return 0; + } if (dev->features & CLOCK_EVT_FEAT_DUMMY) return 0;