i2c: i801: Improve disabling runtime pm
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 6 Aug 2021 21:12:18 +0000 (23:12 +0200)
committerWolfram Sang <wsa@kernel.org>
Tue, 10 Aug 2021 20:36:15 +0000 (22:36 +0200)
commit4e60d5dd10cd82014b26a40519b94444547ec95c
treebec9fc65ca712817009dc8548921cf98cf3662b6
parentf16a3bb69aa6baabf8f0aca982c8cf21e2a4f6bc
i2c: i801: Improve disabling runtime pm

Setting the autosuspend delay to a negative value disables runtime pm in
a little bit smarter way, because we need no cleanup when removing the
driver. Note that this is safe when reloading the driver, because the
call to pm_runtime_set_autosuspend_delay() in probe() will reverse the
effect. See update_autosuspend() for details.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-i801.c