Skip to content
Commit 6051e79b authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman
Browse files

misc: mic: fix passing the current time



I noticed that the mic driver passes a 'struct timespec64' as part of
a message into an attached device, where it is used to set the current
system time.

This won't actually work if one of the two sides runs a 32-bit kernel and
the other runs a 64-bit kernel, since the structure layout is different
between the two.

I found this while replacing calls to the deprecated do_settimeofday64()
interface with the modern ktime_get_real_ts() variant, but it seems
appropriate to address both at the same time here.

To make sure we have a sane structure, let's define our own structure
using the layout of the 64-bit kernel.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e8905914
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment