@@ -59,7 +59,7 @@ struct snd_timer_user {
5959 spinlock_t qlock ;
6060 unsigned long last_resolution ;
6161 unsigned int filter ;
62- struct timespec tstamp ; /* trigger tstamp */
62+ struct timespec64 tstamp ; /* trigger tstamp */
6363 wait_queue_head_t qchange_sleep ;
6464 struct fasync_struct * fasync ;
6565 struct mutex ioctl_lock ;
@@ -453,12 +453,12 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event)
453453 struct snd_timer * timer = ti -> timer ;
454454 unsigned long resolution = 0 ;
455455 struct snd_timer_instance * ts ;
456- struct timespec tstamp ;
456+ struct timespec64 tstamp ;
457457
458458 if (timer_tstamp_monotonic )
459- ktime_get_ts (& tstamp );
459+ ktime_get_ts64 (& tstamp );
460460 else
461- getnstimeofday (& tstamp );
461+ ktime_get_real_ts64 (& tstamp );
462462 if (snd_BUG_ON (event < SNDRV_TIMER_EVENT_START ||
463463 event > SNDRV_TIMER_EVENT_PAUSE ))
464464 return ;
@@ -1025,7 +1025,7 @@ static int snd_timer_dev_disconnect(struct snd_device *device)
10251025 return 0 ;
10261026}
10271027
1028- void snd_timer_notify (struct snd_timer * timer , int event , struct timespec * tstamp )
1028+ void snd_timer_notify (struct snd_timer * timer , int event , struct timespec64 * tstamp )
10291029{
10301030 unsigned long flags ;
10311031 unsigned long resolution = 0 ;
@@ -1318,7 +1318,7 @@ static void snd_timer_user_append_to_tqueue(struct snd_timer_user *tu,
13181318
13191319static void snd_timer_user_ccallback (struct snd_timer_instance * timeri ,
13201320 int event ,
1321- struct timespec * tstamp ,
1321+ struct timespec64 * tstamp ,
13221322 unsigned long resolution )
13231323{
13241324 struct snd_timer_user * tu = timeri -> callback_data ;
@@ -1332,7 +1332,7 @@ static void snd_timer_user_ccallback(struct snd_timer_instance *timeri,
13321332 return ;
13331333 memset (& r1 , 0 , sizeof (r1 ));
13341334 r1 .event = event ;
1335- r1 .tstamp = * tstamp ;
1335+ r1 .tstamp = timespec64_to_timespec ( * tstamp ) ;
13361336 r1 .val = resolution ;
13371337 spin_lock_irqsave (& tu -> qlock , flags );
13381338 snd_timer_user_append_to_tqueue (tu , & r1 );
@@ -1355,7 +1355,7 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri,
13551355{
13561356 struct snd_timer_user * tu = timeri -> callback_data ;
13571357 struct snd_timer_tread * r , r1 ;
1358- struct timespec tstamp ;
1358+ struct timespec64 tstamp ;
13591359 int prev , append = 0 ;
13601360
13611361 memset (& r1 , 0 , sizeof (r1 ));
@@ -1368,14 +1368,14 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri,
13681368 }
13691369 if (tu -> last_resolution != resolution || ticks > 0 ) {
13701370 if (timer_tstamp_monotonic )
1371- ktime_get_ts (& tstamp );
1371+ ktime_get_ts64 (& tstamp );
13721372 else
1373- getnstimeofday (& tstamp );
1373+ ktime_get_real_ts64 (& tstamp );
13741374 }
13751375 if ((tu -> filter & (1 << SNDRV_TIMER_EVENT_RESOLUTION )) &&
13761376 tu -> last_resolution != resolution ) {
13771377 r1 .event = SNDRV_TIMER_EVENT_RESOLUTION ;
1378- r1 .tstamp = tstamp ;
1378+ r1 .tstamp = timespec64_to_timespec ( tstamp ) ;
13791379 r1 .val = resolution ;
13801380 snd_timer_user_append_to_tqueue (tu , & r1 );
13811381 tu -> last_resolution = resolution ;
@@ -1389,14 +1389,14 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri,
13891389 prev = tu -> qtail == 0 ? tu -> queue_size - 1 : tu -> qtail - 1 ;
13901390 r = & tu -> tqueue [prev ];
13911391 if (r -> event == SNDRV_TIMER_EVENT_TICK ) {
1392- r -> tstamp = tstamp ;
1392+ r -> tstamp = timespec64_to_timespec ( tstamp ) ;
13931393 r -> val += ticks ;
13941394 append ++ ;
13951395 goto __wake ;
13961396 }
13971397 }
13981398 r1 .event = SNDRV_TIMER_EVENT_TICK ;
1399- r1 .tstamp = tstamp ;
1399+ r1 .tstamp = timespec64_to_timespec ( tstamp ) ;
14001400 r1 .val = ticks ;
14011401 snd_timer_user_append_to_tqueue (tu , & r1 );
14021402 append ++ ;
@@ -1885,7 +1885,7 @@ static int snd_timer_user_status(struct file *file,
18851885 if (!tu -> timeri )
18861886 return - EBADFD ;
18871887 memset (& status , 0 , sizeof (status ));
1888- status .tstamp = tu -> tstamp ;
1888+ status .tstamp = timespec64_to_timespec ( tu -> tstamp ) ;
18891889 status .resolution = snd_timer_resolution (tu -> timeri );
18901890 status .lost = tu -> timeri -> lost ;
18911891 status .overrun = tu -> overrun ;
0 commit comments