Clear acm->tty on last close because the tty layer
releases the tty object at that point.
Use a NULL device when calling tty_register_device to prevent
tty layer from creating sysfs entries that references the device.
This prevents oops in sysfs_hash_and_remove when tty_unregister_device
is called after usb device is disconnected during use.
Signed-off-by: Paul Fulghum <[EMAIL PROTECTED]>
--- linux-2.6.16-rc5/drivers/usb/class/cdc-acm.c 2006-02-27
14:40:21.000000000 -0600
+++ b/drivers/usb/class/cdc-acm.c 2006-03-13 10:14:15.000000000 -0600
@@ -517,6 +517,7 @@ static void acm_tty_close(struct tty_str
usb_kill_urb(acm->ru[i].urb);
} else
acm_tty_unregister(acm);
+ acm->tty = NULL;
}
up(&open_sem);
}
@@ -980,7 +981,7 @@ skip_normal_probe:
usb_driver_claim_interface(&acm_driver, data_interface, acm);
usb_get_intf(control_interface);
- tty_register_device(acm_tty_driver, minor, &control_interface->dev);
+ tty_register_device(acm_tty_driver, minor, NULL);
acm_table[minor] = acm;
usb_set_intfdata (intf, acm);
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel