Re: [RFC 11/12] HID: wiimote: Cache wiimote led state

From
Oliver Neukum <oliver@neukum.org>
Date
2011-06-15 06:42:19
Reply to
David Herrmann, 2011-06-14
Am Mittwoch, 15. Juni 2011, 01:45:56 schrieb David Herrmann:
quoted hunk ↗ jump to hunk
@@ -319,7 +340,12 @@ static int wiimote_hid_probe(struct hid_device *hdev,
 
        atomic_set(&wdata->ready, 1);
        hid_info(hdev, "New device registered\n");
+
+       /* by default set led1 after device initialization */
+       spin_lock(&wdata->state.lock);
spin_lock_irq() or you might deadlock.
quoted hunk ↗ jump to hunk
        wiiproto_req_leds(wdata, WIIPROTO_FLAG_LED1);
+       spin_unlock(&wdata->state.lock);
+
        return 0;
	Regards
		Oliver
Thread (24 messages) 24 messages, 4 authors, last reply 2011-06-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help