File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 6
6
#include <linux/module.h>
7
7
#include <linux/hrtimer.h>
8
8
#include <linux/vmalloc.h>
9
+ #include <linux/version.h>
9
10
#include <sound/core.h>
10
11
#include <sound/initval.h>
11
12
#include <sound/pcm.h>
@@ -499,7 +500,13 @@ static int gip_headset_probe(struct gip_client *client)
499
500
INIT_DELAYED_WORK (& headset -> work_power_on , gip_headset_power_on );
500
501
INIT_WORK (& headset -> work_register , gip_headset_register );
501
502
503
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION (6 ,15 ,0 )
504
+ hrtimer_setup (& headset -> timer , headset -> timer .function ,
505
+ CLOCK_MONOTONIC , HRTIMER_MODE_REL );
506
+ #else
502
507
hrtimer_init (& headset -> timer , CLOCK_MONOTONIC , HRTIMER_MODE_REL );
508
+ #endif
509
+
503
510
headset -> timer .function = gip_headset_send_samples ;
504
511
505
512
err = gip_enable_audio (client );
You can’t perform that action at this time.
0 commit comments