Commit cc0df651 authored by Duncan Sands's avatar Duncan Sands Committed by Linus Torvalds

[PATCH] USB speedtouch: add defensive memory barriers

Defend against future maintainers.
parent 2c0f1af0
......@@ -1228,6 +1228,7 @@ static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_i
finish:
/* ready for ATM callbacks */
wmb ();
instance->atm_dev->dev_data = instance;
usb_set_intfdata (intf, instance);
......@@ -1366,6 +1367,7 @@ static void udsl_usb_disconnect (struct usb_interface *intf)
for (i = 0; i < UDSL_NUMBER_SND_BUFS; i++)
kfree (instance->all_buffers[i].base);
wmb ();
instance->usb_dev = NULL;
/* atm finalize */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment