diff mbox series

[2/2] HID: intel-ish-hid: fix wrong driver_data setting

Message ID 1559079417-32039-2-git-send-email-hyungwoo.yang@intel.com (mailing list archive)
State Superseded
Delegated to: Jiri Kosina
Headers show
Series [1/2] HID: intel-ish-hid: fix wrong type conversion | expand

Commit Message

Hyungwoo Yang May 28, 2019, 9:36 p.m. UTC
driver_data of HECI client device should be managed(set/get) by
corresponding HECI client driver. Bus shouldn't set it.

Change-Id: I128e36663e3b1f88b53dac7a9d8b846475215875
Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
---
 drivers/hid/intel-ish-hid/ishtp/bus.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c
index fb8ca12..036aa43 100644
--- a/drivers/hid/intel-ish-hid/ishtp/bus.c
+++ b/drivers/hid/intel-ish-hid/ishtp/bus.c
@@ -479,7 +479,6 @@  static struct ishtp_cl_device *ishtp_bus_add_device(struct ishtp_device *dev,
 	}
 
 	ishtp_device_ready = true;
-	dev_set_drvdata(&device->dev, device);
 
 	return device;
 }
@@ -647,6 +646,13 @@  void *ishtp_get_drvdata(struct ishtp_cl_device *cl_device)
 }
 EXPORT_SYMBOL(ishtp_get_drvdata);
 
+
+struct ishtp_cl_device *ishtp_dev_to_cl_device(struct device *device)
+{
+	return container_of(device, struct ishtp_cl_device, dev);
+}
+EXPORT_SYMBOL(ishtp_dev_to_cl_device);
+
 /**
  * ishtp_bus_new_client() - Create a new client
  * @dev:	ISHTP device instance