diff mbox

[2/3] HID: sensor-hub: get rid of unused sensor_hub_grabbed_usages[] table

Message ID 4FA419E87744DF4DAECD5BCE1214B7A91E00EB72@ORSMSX108.amr.corp.intel.com (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Pandruvada, Srinivas Feb. 11, 2013, 3:53 p.m. UTC
This was added to load sensor hub driver on USB plug in without explicit modprobe. 
But with last few changes to remove vendor and product id, we need to do modprobe this driver.
So removal is OK.

Thanks,
Srinivas


-----Original Message-----
From: Mika Westerberg [mailto:mika.westerberg@linux.intel.com] 
Sent: Monday, February 11, 2013 2:31 AM
To: linux-kernel@vger.kernel.org
Cc: Jiri Kosina; Benjamin Tissoires; linux-input@vger.kernel.org; Pandruvada, Srinivas; Mika Westerberg
Subject: [PATCH 2/3] HID: sensor-hub: get rid of unused sensor_hub_grabbed_usages[] table

This table is not used anywhere in the driver so kill it.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/hid/hid-sensor-hub.c |    5 -----
 1 file changed, 5 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Benjamin Tissoires Feb. 11, 2013, 5:12 p.m. UTC | #1
On Mon, Feb 11, 2013 at 4:53 PM, Pandruvada, Srinivas
<srinivas.pandruvada@intel.com> wrote:
> This was added to load sensor hub driver on USB plug in without explicit modprobe.
> But with last few changes to remove vendor and product id, we need to do modprobe this driver.
> So removal is OK.

I just figure your comment out: the change does not seem to have
anything to do with hotplugging. .usage_table is used to decide which
HID reports to forwards to the .event() callback, and NULL means all
events. So even if it was in use, there are no functional changes.

Thanks to the changes to remove the vendor id and product id, you
shouldn't have to manually modprobe the driver as the hid-core
subsystem will tag the hid device as a sensor one, meaning that udev
will modprobe the driver if it's not already loaded.
So if you still have to manually modprobe your driver (or maybe you
are talking about the mfd driver), there is a bug in the detection of
sensors devices. And this has to be fixed :)

Cheers,
Benjamin
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jiri Kosina Feb. 18, 2013, 9:26 a.m. UTC | #2
On Mon, 11 Feb 2013, Pandruvada, Srinivas wrote:

> This was added to load sensor hub driver on USB plug in without explicit modprobe. 
> But with last few changes to remove vendor and product id, we need to do modprobe this driver.
> So removal is OK.

Srinivas,

sorry, I have a hard time parsing your message.

The modprobing should work just fine with HID_GROUP_SENSOR_HUB, this has 
nothing to do with ->usage_table callback.
diff mbox

Patch

diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index c06e933..2643bce9 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -608,11 +608,6 @@  static const struct hid_device_id sensor_hub_devices[] = {  };  MODULE_DEVICE_TABLE(hid, sensor_hub_devices);
 
-static const struct hid_usage_id sensor_hub_grabbed_usages[] = {
-	{ HID_ANY_ID, HID_ANY_ID, HID_ANY_ID },
-	{ HID_ANY_ID - 1, HID_ANY_ID - 1, HID_ANY_ID - 1 }
-};
-
 static struct hid_driver sensor_hub_driver = {
 	.name = "hid-sensor-hub",
 	.id_table = sensor_hub_devices,
--
1.7.10.4