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 <hyungwoo.yang@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-on: https://chromium-review.googlesource.com/1643896
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
(cherry picked from commit 2ec76e1af56a634cc6a2102984042bfea3ad9f2e)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1654089
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
3 files changed