USB printer bugfix
looking through printer.c in preparation for shifting devfs
support to usbcore I noticed that printer advertises a device
through devfs before it can be opened.
As devfs, or more precisely devfsd can be used to trigger actions
this matters and is wrong.
usblp_check_status(usblp, 0);
#endif
+ /* add a table entry so the device works when advertised */
+ usblp_table[usblp->minor] = usblp;
+
/* If we have devfs, create with perms=660. */
sprintf(name, "lp%d", usblp->minor);
usblp->devfs = devfs_register(usb_devfs_handle, name,
usblp->current_protocol, usblp->dev->descriptor.idVendor,
usblp->dev->descriptor.idProduct);
- return usblp_table[usblp->minor] = usblp;
+ return usblp;
abort:
if (usblp) {