linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] Fix kernel warning and failure
@ 2013-12-06  0:34 Srinivas Pandruvada
  2013-12-06  0:34 ` [PATCH v1] HID: hid-sensor-hub: " Srinivas Pandruvada
  0 siblings, 1 reply; 3+ messages in thread
From: Srinivas Pandruvada @ 2013-12-06  0:34 UTC (permalink / raw)
  To: jkosina; +Cc: linux-input, Srinivas Pandruvada

v1:
Use platform driver capability to assign unique id.
In this way it is just one line change.

v0:
Use idr to allocate unique cell id

Srinivas Pandruvada (1):
  HID: hid-sensor-hub: Fix kernel warning and failure

 drivers/hid/hid-sensor-hub.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
1.8.1.2


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

* [PATCH v1] HID: hid-sensor-hub: Fix kernel warning and failure
  2013-12-06  0:34 [PATCH v1] Fix kernel warning and failure Srinivas Pandruvada
@ 2013-12-06  0:34 ` Srinivas Pandruvada
  2013-12-09 14:46   ` Jiri Kosina
  0 siblings, 1 reply; 3+ messages in thread
From: Srinivas Pandruvada @ 2013-12-06  0:34 UTC (permalink / raw)
  To: jkosina; +Cc: linux-input, Srinivas Pandruvada

Fix kernel warning and failure to register sensor hub devices with MFD.
Now many devices has in-built sensor hubs. So by default this HID hub,
is properly parsed and register individual sensors as platform device
using MFD framework. But if a second sensor hub is attached via USB,
which has same sensors, it will result in kernel warning and failure
to register MFD cell as the platform device sysfs file name will be
same as created by in-built sensor hubs. This patch sets MFD cell id
to PLATFORM_DEVID_AUTO. In this way there will never
be duplicate sysfs file names.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 drivers/hid/hid-sensor-hub.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index a184e19..8af2d90 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -573,6 +573,8 @@ static int sensor_hub_probe(struct hid_device *hdev,
 					goto err_free_names;
 			}
 			sd->hid_sensor_hub_client_devs[
+				sd->hid_sensor_client_cnt].id = PLATFORM_DEVID_AUTO;
+			sd->hid_sensor_hub_client_devs[
 				sd->hid_sensor_client_cnt].name = name;
 			sd->hid_sensor_hub_client_devs[
 				sd->hid_sensor_client_cnt].platform_data =
-- 
1.8.1.2


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

* Re: [PATCH v1] HID: hid-sensor-hub: Fix kernel warning and failure
  2013-12-06  0:34 ` [PATCH v1] HID: hid-sensor-hub: " Srinivas Pandruvada
@ 2013-12-09 14:46   ` Jiri Kosina
  0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2013-12-09 14:46 UTC (permalink / raw)
  To: Srinivas Pandruvada; +Cc: linux-input

On Thu, 5 Dec 2013, Srinivas Pandruvada wrote:

> Fix kernel warning and failure to register sensor hub devices with MFD.
> Now many devices has in-built sensor hubs. So by default this HID hub,
> is properly parsed and register individual sensors as platform device
> using MFD framework. But if a second sensor hub is attached via USB,
> which has same sensors, it will result in kernel warning and failure
> to register MFD cell as the platform device sysfs file name will be
> same as created by in-built sensor hubs. This patch sets MFD cell id
> to PLATFORM_DEVID_AUTO. In this way there will never
> be duplicate sysfs file names.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

Applied, thanks Srinivas.

-- 
Jiri Kosina
SUSE Labs

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

end of thread, other threads:[~2013-12-09 14:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-06  0:34 [PATCH v1] Fix kernel warning and failure Srinivas Pandruvada
2013-12-06  0:34 ` [PATCH v1] HID: hid-sensor-hub: " Srinivas Pandruvada
2013-12-09 14:46   ` Jiri Kosina

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).