linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/chrome: fix crash during suspend
@ 2019-05-30  4:03 Hyungwoo Yang
  2019-05-31 10:21 ` Enric Balletbo i Serra
  2019-07-29 11:29 ` Enric Balletbo i Serra
  0 siblings, 2 replies; 6+ messages in thread
From: Hyungwoo Yang @ 2019-05-30  4:03 UTC (permalink / raw)
  To: enric.balletbo; +Cc: linux-kernel, rushikesh.s.kadam, jettrink

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

Use the proper helper to get ishtp_cl_device instance.

Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
---
 drivers/platform/chrome/cros_ec_ishtp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/chrome/cros_ec_ishtp.c b/drivers/platform/chrome/cros_ec_ishtp.c
index e504d25..430731c 100644
--- a/drivers/platform/chrome/cros_ec_ishtp.c
+++ b/drivers/platform/chrome/cros_ec_ishtp.c
@@ -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);
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-29 11:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30  4:03 [PATCH] platform/chrome: fix crash during suspend Hyungwoo Yang
2019-05-31 10:21 ` Enric Balletbo i Serra
2019-05-31 18:15   ` Yang, Hyungwoo
2019-06-04 15:03     ` Enric Balletbo i Serra
2019-06-04 16:17       ` Yang, Hyungwoo
2019-07-29 11:29 ` Enric Balletbo i Serra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).