i2c: i801: Save register SMBSLVCMD value only once
authorJean Delvare <[email protected]>
Wed, 11 Apr 2018 16:03:31 +0000 (18:03 +0200)
committerWolfram Sang <[email protected]>
Wed, 11 Apr 2018 21:07:14 +0000 (23:07 +0200)
commita086bb8317303dd74725dca933b9b29575159382
treec772ccb7f58039ffe283f9717da859cc02ac5bbd
parent8837c70d531a1788f975c366c254a5cb973a5291
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 <[email protected]>
Fixes: 22e94bd6779e ("i2c: i801: store and restore the SLVCMD register at load and unload")
Reviewed-by: Benjamin Tissoires <[email protected]>
Tested-by: Jason Andryuk <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Cc: [email protected] # v4.10+
drivers/i2c/busses/i2c-i801.c