On Tue, 2019-05-28 at 14:36 -0700, Hyungwoo Yang wrote: > "struct device" is embedded in "struct ishtp_cl_device". > so the conversion should be done by container_of() method. Which tree this patch is going to? You can't even apply on the mainline tree (5.2-rc2). Also you will not be able to compile even if you address the conflict (The patch ordering is wrong). What was symptom or problem you try to address? Is there any crash or bug occurred? Does it happen with the mainline kernel? > > Change-Id: Idcbafe724e216ee6275f9d1e35a3b79cee5ce88c This tells me that you are trying to fix some Chrome issue. Don't include these tags for mainline kernel. Thanks, Srinivas > Signed-off-by: Hyungwoo Yang <hyungwoo.yang@xxxxxxxxx> > --- > drivers/hid/intel-ish-hid/ishtp-hid-client.c | 4 ++-- > drivers/platform/chrome/cros_ec_ishtp.c | 4 ++-- > include/linux/intel-ish-client-if.h | 1 + > 3 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/hid/intel-ish-hid/ishtp-hid-client.c > b/drivers/hid/intel-ish-hid/ishtp-hid-client.c > index 56777a4..19102a3 100644 > --- a/drivers/hid/intel-ish-hid/ishtp-hid-client.c > +++ b/drivers/hid/intel-ish-hid/ishtp-hid-client.c > @@ -899,7 +899,7 @@ static int hid_ishtp_cl_reset(struct > ishtp_cl_device *cl_device) > */ > static int hid_ishtp_cl_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 *hid_ishtp_cl = ishtp_get_drvdata(cl_device); > struct ishtp_cl_data *client_data = > ishtp_get_client_data(hid_ishtp_cl); > > @@ -920,7 +920,7 @@ static int hid_ishtp_cl_suspend(struct device > *device) > */ > static int hid_ishtp_cl_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 *hid_ishtp_cl = ishtp_get_drvdata(cl_device); > struct ishtp_cl_data *client_data = > ishtp_get_client_data(hid_ishtp_cl); > > 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); > > diff --git a/include/linux/intel-ish-client-if.h > b/include/linux/intel-ish-client-if.h > index 16255c2..0d6b4bc 100644 > --- a/include/linux/intel-ish-client-if.h > +++ b/include/linux/intel-ish-client-if.h > @@ -103,6 +103,7 @@ int ishtp_register_event_cb(struct > ishtp_cl_device *device, > void ishtp_get_device(struct ishtp_cl_device *cl_dev); > void ishtp_set_drvdata(struct ishtp_cl_device *cl_device, void > *data); > void *ishtp_get_drvdata(struct ishtp_cl_device *cl_device); > +struct ishtp_cl_device *ishtp_dev_to_cl_device(struct device *dev); > int ishtp_register_event_cb(struct ishtp_cl_device *device, > void (*read_cb)(struct ishtp_cl_device > *)); > struct ishtp_fw_client *ishtp_fw_cl_get_client(struct > ishtp_device *dev,