FROMLIST: HID: intel-ish-hid: fix wrong driver_data usage

Currently, in suspend() and resume(), ishtp client drivers are using
driver_data to get "struct ishtp_cl_device" object which is set by
bus driver. It's wrong since the driver_data should not be owned bus.
driver_data should be owned by the corresponding ishtp client driver.
Due to this, some ishtp client driver like cros_ec_ishtp which uses
its driver_data to transfer its data to its child doesn't work correctly.

So this patch removes setting driver_data in bus driver and instead of
using driver_data to get "struct ishtp_cl_device", since "struct device"
is embedded in "struct ishtp_cl_device", we introduce a helper function
that returns "struct ishtp_cl_device" from "struct device".

(am from https://patchwork.kernel.org/patch/10978417/)

BUG=b:131255379
TEST=Suspend/Resume tested on Arcada platform.

Change-Id: Id2bd048dbf1933f4d78130bf058d32b492a5ce22
Signed-off-by: Hyungwoo Yang <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/1643896
Legacy-Commit-Queue: Commit Bot <[email protected]>
Reviewed-by: Jack Rosenthal <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
(cherry picked from commit 2ec76e1af56a634cc6a2102984042bfea3ad9f2e)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1654089
Commit-Queue: Jack Rosenthal <[email protected]>
Tested-by: Jack Rosenthal <[email protected]>
3 files changed