]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: i801: Save register SMBSLVCMD value only once
authorJean Delvare <jdelvare@suse.de>
Wed, 11 Apr 2018 16:03:31 +0000 (18:03 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 11 Apr 2018 21:07:14 +0000 (23:07 +0200)
commit4655b7849c019c6c70e9ee6fa65f81cfe0010a05
treec772ccb7f58039ffe283f9717da859cc02ac5bbd
parente519a2cab1a529b48ef84ab384ea24f411addeb7
i2c: i801: Save register SMBSLVCMD value only once

Saving the original value of register SMBSLVCMD in
i801_enable_host_notify() doesn't work, because this function is
called not only at probe time but also at resume time. Do it in
i801_probe() instead, so that the saved value is not overwritten at
resume time.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: 1bda25284e87 ("i2c: i801: store and restore the SLVCMD register at load and unload")
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@vger.kernel.org # v4.10+
drivers/i2c/busses/i2c-i801.c