Skip to content

Commit a8eaad7

Browse files
arndbtiwai
authored andcommitted
ALSA: line6: stop using get_seconds()
The get_seconds() function is deprecated because it truncates the timestamp to 32 bits, so all users should change to ktime_get_seconds() or ktime_get_real_seconds(). The firmware interface for passing the timestamp is also limited to 32 bits, so this patch only has the cosmetic effect of avoiding the old interface. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent a753af3 commit a8eaad7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sound/usb/line6/toneport.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,13 @@ static bool toneport_has_source_select(struct usb_line6_toneport *toneport)
367367
*/
368368
static void toneport_setup(struct usb_line6_toneport *toneport)
369369
{
370-
int ticks;
370+
u32 ticks;
371371
struct usb_line6 *line6 = &toneport->line6;
372372
struct usb_device *usbdev = line6->usbdev;
373373

374374
/* sync time on device with host: */
375-
ticks = (int)get_seconds();
375+
/* note: 32-bit timestamps overflow in year 2106 */
376+
ticks = (u32)ktime_get_real_seconds();
376377
line6_write_data(line6, 0x80c6, &ticks, 4);
377378

378379
/* enable device: */

0 commit comments

Comments
 (0)