Commit 9cdde858 authored by Hyungwoo Yang's avatar Hyungwoo Yang Committed by Enric Balletbo i Serra
Browse files

platform/chrome: cros_ec_ishtp: fix crash during suspend



Kernel crashes during suspend due to wrong conversion in
suspend and resume functions.

Use the proper helper to get ishtp_cl_device instance.

Cc: <stable@vger.kernel.org> # 5.2.x: b12bbdc5: HID: intel-ish-hid: fix wrong driver_data usage
Signed-off-by: default avatarHyungwoo Yang <hyungwoo.yang@intel.com>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
parent 5f9e832c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -707,7 +707,7 @@ static int cros_ec_ishtp_reset(struct ishtp_cl_device *cl_device)
 */
static int __maybe_unused cros_ec_ishtp_suspend(struct device *device)
{
	struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
	struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
	struct ishtp_cl	*cros_ish_cl = ishtp_get_drvdata(cl_device);
	struct ishtp_cl_data *client_data = ishtp_get_client_data(cros_ish_cl);

@@ -722,7 +722,7 @@ static int __maybe_unused cros_ec_ishtp_suspend(struct device *device)
 */
static int __maybe_unused cros_ec_ishtp_resume(struct device *device)
{
	struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
	struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
	struct ishtp_cl	*cros_ish_cl = ishtp_get_drvdata(cl_device);
	struct ishtp_cl_data *client_data = ishtp_get_client_data(cros_ish_cl);