platform/chrome: cros_ec_lpc: Move mec_init to device probe
authorBrian Norris <briannorris@chromium.org>
Tue, 1 Nov 2022 22:22:06 +0000 (15:22 -0700)
committerTzung-Bi Shih <tzungbi@kernel.org>
Wed, 2 Nov 2022 04:28:47 +0000 (12:28 +0800)
commitfdf84f9ae30b40e3707359bcd467173b9d43454c
treea4fd8d619ef025ecb82f8bcdc0ddb1b923a3bdf1
parent58f23a6795a6c165b8c04041bacb999119f9dbc9
platform/chrome: cros_ec_lpc: Move mec_init to device probe

Disregarding the weird global state hiding in this cros_ec_lpc_mec_*()
stuff, it belongs in device probe. We shouldn't assume we can access
hardware resources when the device isn't attached to the driver.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20221101152132.v2.1.I0728421299079b104710c202d5d7095b2674fd8c@changeid
drivers/platform/chrome/cros_ec_lpc.c