От: | the_moon | ||
Дата: | 02.11.06 07:42 | ||
Оценка: |
static int usb_mscanner_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
struct usb_device *dev = interface_to_usbdev(intf);
struct usb_host_interface *interface;
struct usb_endpoint_descriptor *endpoint;
struct usb_mouse *mouse;
struct input_dev *input_dev;
int pipe, maxp;
printk( KERN_INFO "MSCANNER: Called for probing\n" );
static struct usb_device_id usb_mouse_id_table [] = {
/* { USB_INTERFACE_INFO(3, 1, 2) }, */
{ USB_DEVICE(USB_VENDOR_ID,USB_PRODUCT_ID) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, usb_mouse_id_table);
static struct usb_driver usb_mouse_driver = {
.name = "usbmousescanner",
.probe = usb_mscanner_probe,
.disconnect = usb_mscanner_disconnect,
.id_table = usb_mouse_id_table,
};
static int __init usb_mouse_init(void)
{
int retval = usb_register(&usb_mouse_driver);
printk( KERN_INFO "MSCANNER: Registering [%d]\n", retval );
if (retval == 0)
printk( KERN_INFO "MSCANNER: Registered " DRIVER_VERSION ":" DRIVER_DESC "\n" );
return retval;
}
usbcore: registered new driver usbmousescanner
MSCANNER: Registering [0]
MSCANNER: Registered v0.1:Mouse-scaner