Skip to content

Commit 9cdde85

Browse files
smartbeast75Enric Balletbo i Serra
authored andcommitted
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: <[email protected]> # 5.2.x: b12bbdc: HID: intel-ish-hid: fix wrong driver_data usage Signed-off-by: Hyungwoo Yang <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]>
1 parent 5f9e832 commit 9cdde85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/platform/chrome/cros_ec_ishtp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ static int cros_ec_ishtp_reset(struct ishtp_cl_device *cl_device)
707707
*/
708708
static int __maybe_unused cros_ec_ishtp_suspend(struct device *device)
709709
{
710-
struct ishtp_cl_device *cl_device = dev_get_drvdata(device);
710+
struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
711711
struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
712712
struct ishtp_cl_data *client_data = ishtp_get_client_data(cros_ish_cl);
713713

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

0 commit comments

Comments
 (0)