- atomic_t write_busy; /* true iff write urb is busy */
- struct completion write_finished; /* wait for the write to finish */
-
- int open; /* if the port is open or not */
- int present; /* if the device is not disconnected */
- struct semaphore sem; /* locks this structure */
-};
-
-
-/* prevent races between open() and disconnect() */
-static DECLARE_MUTEX (disconnect_sem);
-
-/* local function prototypes */
-static ssize_t skel_read (struct file *file, char *buffer, size_t count, loff_t *ppos);
-static ssize_t skel_write (struct file *file, const char *buffer, size_t count, loff_t *ppos);
-static int skel_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg);
-static int skel_open (struct inode *inode, struct file *file);
-static int skel_release (struct inode *inode, struct file *file);
-
-static int skel_probe (struct usb_interface *interface, const struct usb_device_id *id);
-static void skel_disconnect (struct usb_interface *interface);
-
-static void skel_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
-
-/*
- * File operations needed when we register this driver.
- * This assumes that this driver NEEDS file operations,
- * of course, which means that the driver is expected
- * to have a node in the /dev directory. If the USB
- * device were for a network interface then the driver
- * would use "struct net_driver" instead, and a serial
- * device would use "struct tty_driver".
- */
-static struct file_operations skel_fops = {
- /*
- * The owner field is part of the module-locking
- * mechanism. The idea is that the kernel knows
- * which module to increment the use-counter of
- * BEFORE it calls the device's open() function.
- * This also means that the kernel can decrement
- * the use-counter again before calling release()
- * or should the open() function fail.
- */
- .owner = THIS_MODULE,
-
- .read = skel_read,
- .write = skel_write,
- .ioctl = skel_ioctl,
- .open = skel_open,
- .release = skel_release,
-};
-
-/*
- * usb class driver info in order to get a minor number from the usb core,
- * and to have the device registered with devfs and the driver core
- */
-static struct usb_class_driver skel_class = {
- .name = "usb/skel%d",
- .fops = &skel_fops,
- .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH,
- .minor_base = USB_SKEL_MINOR_BASE,
-};
-
-/* usb specific object needed to register this driver with the usb subsystem */
-static struct usb_driver skel_driver = {
- .owner = THIS_MODULE,
- .name = "skeleton",
- .probe = skel_probe,
- .disconnect = skel_disconnect,
- .id_table = skel_table,