From: David Herrmann Date: Sun, 26 May 2013 20:55:02 +0000 (+0200) Subject: HID: wiimote: init EXT/MP during device detection X-Git-Tag: firefly_0821_release~176^2~5777^2^3~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=77a7480992844d506a62f866f0824aec429d7658;p=firefly-linux-kernel-4.4.55.git HID: wiimote: init EXT/MP during device detection We normally get EXT hotplug events or poll for MP hotplugging so we don't need to force extension port initialization during device setup. But for gen20 devices, we disable MP polling because MP is always present. However, this prevents MP initialization during device setup and users need to plug another extension to trigger EXT/MP detection. Therefore, we now trigger EXT/MP detection during device setup automatically. This also avoids slightly delayed extension detection and provides sysfs child-devices prior to the "changed"-uevent during device setup. Signed-off-by: David Herrmann Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index 3e696562c944..ea00030defd6 100644 --- a/drivers/hid/hid-wiimote-core.c +++ b/drivers/hid/hid-wiimote-core.c @@ -1188,7 +1188,7 @@ static void wiimote_init_worker(struct work_struct *work) changed = true; } - if (!wiimote_init_check(wdata)) + if (changed || !wiimote_init_check(wdata)) wiimote_init_hotplug(wdata); if (changed)