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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/hid/intel-ish-hid/ishtp/bus.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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
-- 
1.9.1




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux