static int __init csvt_init(void) { int retval; retval = usb_serial_register_drivers(serial_drivers, "qc_csvt", id_table); if (retval) { pr_err("%s: usb serial register failed\n", __func__); return retval; } return 0; }
int usb_serial_generic_register(void) { int retval = 0; #ifdef CONFIG_USB_SERIAL_GENERIC generic_device_ids[0].idVendor = vendor; generic_device_ids[0].idProduct = product; generic_device_ids[0].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT; retval = usb_serial_register_drivers(serial_drivers, "usbserial_generic", generic_device_ids); #endif return retval; }
static int __init ipaq_init(void) { int retval; if (vendor) { ipaq_id_table[0].idVendor = vendor; ipaq_id_table[0].idProduct = product; } retval = usb_serial_register_drivers(&ipaq_driver, serial_drivers); if (retval == 0) printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" DRIVER_DESC "\n"); return retval; }
int usb_serial_generic_register(int _debug) { int retval = 0; debug = _debug; #ifdef CONFIG_USB_SERIAL_GENERIC generic_device_ids[0].idVendor = vendor; generic_device_ids[0].idProduct = product; generic_device_ids[0].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT; /* register our generic driver with ourselves */ retval = usb_serial_register_drivers(&generic_driver, serial_drivers); #endif return retval; }
static int __init safe_init(void) { int i; printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" DRIVER_DESC "\n"); /* if we have vendor / product parameters patch them into id list */ if (vendor || product) { printk(KERN_INFO KBUILD_MODNAME ": vendor: %x product: %x\n", vendor, product); for (i = 0; i < ARRAY_SIZE(id_table); i++) { if (!id_table[i].idVendor && !id_table[i].idProduct) { id_table[i].idVendor = vendor; id_table[i].idProduct = product; break; } } } return usb_serial_register_drivers(serial_drivers, KBUILD_MODNAME, id_table); }