summaryrefslogtreecommitdiff
path: root/drivers/hid/intel-ish-hid/ipc
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2016-11-05 18:15:03 +0300
committerJiri Kosina <jkosina@suse.cz>2016-11-06 00:59:36 +0300
commit15607a3ad4272ed6f781a5250479c87746746dda (patch)
tree9507bd58c1d33fa9a0811ead283cf5b77e237e2a /drivers/hid/intel-ish-hid/ipc
parent8a1e377e55f2dca5c689926313beeaa8ac2adb22 (diff)
downloadlinux-15607a3ad4272ed6f781a5250479c87746746dda.tar.xz
HID: intel-ish-hid: initialize ts_format.reserved
ts_format.reserved is not used anywhere yet, but the compiler generates a warning when the struct's (uninitialized) field is being copied around drivers/hid/intel-ish-hid/ipc/ipc.c: In function ‘write_ipc_from_queue’: drivers/hid/intel-ish-hid/ipc/ipc.c:316: warning: ‘ts_format.reserved’ may be used uninitialized in this function Avoid this by force-initializing the field to zero. Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/intel-ish-hid/ipc')
-rw-r--r--drivers/hid/intel-ish-hid/ipc/ipc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-ish-hid/ipc/ipc.c
index e2517c11e0ee..37f069749672 100644
--- a/drivers/hid/intel-ish-hid/ipc/ipc.c
+++ b/drivers/hid/intel-ish-hid/ipc/ipc.c
@@ -310,6 +310,7 @@ static int write_ipc_from_queue(struct ishtp_device *dev)
((uint32_t)tv_utc.tv_usec);
ts_format.ts1_source = HOST_SYSTEM_TIME_USEC;
ts_format.ts2_source = HOST_UTC_TIME_USEC;
+ ts_format.reserved = 0;
time_update.primary_host_time = usec_system;
time_update.secondary_host_time = usec_utc;