empeg.c (458ce2910aa83d8a2cafb489d727f7da839e73c6) empeg.c (10a6b9ce8ecf0dcaabb10089bdf1b4bb30f3092a)
1/*
2 * USB Empeg empeg-car player driver
3 *
4 * Copyright (C) 2000, 2001
5 * Gary Brubaker (xavyer@ix.netcom.com)
6 *
7 * Copyright (C) 1999 - 2001
8 * Greg Kroah-Hartman (greg@kroah.com)

--- 42 unchanged lines hidden (view full) ---

51
52MODULE_DEVICE_TABLE(usb, id_table);
53
54static struct usb_driver empeg_driver = {
55 .name = "empeg",
56 .probe = usb_serial_probe,
57 .disconnect = usb_serial_disconnect,
58 .id_table = id_table,
1/*
2 * USB Empeg empeg-car player driver
3 *
4 * Copyright (C) 2000, 2001
5 * Gary Brubaker (xavyer@ix.netcom.com)
6 *
7 * Copyright (C) 1999 - 2001
8 * Greg Kroah-Hartman (greg@kroah.com)

--- 42 unchanged lines hidden (view full) ---

51
52MODULE_DEVICE_TABLE(usb, id_table);
53
54static struct usb_driver empeg_driver = {
55 .name = "empeg",
56 .probe = usb_serial_probe,
57 .disconnect = usb_serial_disconnect,
58 .id_table = id_table,
59 .no_dynamic_id = 1,
60};
61
62static struct usb_serial_driver empeg_device = {
63 .driver = {
64 .owner = THIS_MODULE,
65 .name = "empeg",
66 },
67 .id_table = id_table,
59};
60
61static struct usb_serial_driver empeg_device = {
62 .driver = {
63 .owner = THIS_MODULE,
64 .name = "empeg",
65 },
66 .id_table = id_table,
68 .usb_driver = &empeg_driver,
69 .num_ports = 1,
70 .bulk_out_size = 256,
71 .throttle = usb_serial_generic_throttle,
72 .unthrottle = usb_serial_generic_unthrottle,
73 .attach = empeg_startup,
74 .init_termios = empeg_init_termios,
75};
76
67 .num_ports = 1,
68 .bulk_out_size = 256,
69 .throttle = usb_serial_generic_throttle,
70 .unthrottle = usb_serial_generic_unthrottle,
71 .attach = empeg_startup,
72 .init_termios = empeg_init_termios,
73};
74
75static struct usb_serial_driver * const serial_drivers[] = {
76 &empeg_device, NULL
77};
78
77static int empeg_startup(struct usb_serial *serial)
78{
79 int r;
80
81 dbg("%s", __func__);
82
83 if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
84 dev_err(&serial->dev->dev, "active config #%d != 1 ??\n",

--- 46 unchanged lines hidden (view full) ---

131 | CBAUD); /* clear current baud rate */
132
133 termios->c_cflag
134 |= CS8; /* character size 8 bits */
135
136 tty_encode_baud_rate(tty, 115200, 115200);
137}
138
79static int empeg_startup(struct usb_serial *serial)
80{
81 int r;
82
83 dbg("%s", __func__);
84
85 if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
86 dev_err(&serial->dev->dev, "active config #%d != 1 ??\n",

--- 46 unchanged lines hidden (view full) ---

133 | CBAUD); /* clear current baud rate */
134
135 termios->c_cflag
136 |= CS8; /* character size 8 bits */
137
138 tty_encode_baud_rate(tty, 115200, 115200);
139}
140
139static int __init empeg_init(void)
140{
141 int retval;
141module_usb_serial_driver(empeg_driver, serial_drivers);
142
142
143 retval = usb_serial_register(&empeg_device);
144 if (retval)
145 return retval;
146 retval = usb_register(&empeg_driver);
147 if (retval) {
148 usb_serial_deregister(&empeg_device);
149 return retval;
150 }
151 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
152 DRIVER_DESC "\n");
153
154 return 0;
155}
156
157static void __exit empeg_exit(void)
158{
159 usb_deregister(&empeg_driver);
160 usb_serial_deregister(&empeg_device);
161}
162
163
164module_init(empeg_init);
165module_exit(empeg_exit);
166
167MODULE_AUTHOR(DRIVER_AUTHOR);
168MODULE_DESCRIPTION(DRIVER_DESC);
169MODULE_LICENSE("GPL");
170
171module_param(debug, bool, S_IRUGO | S_IWUSR);
172MODULE_PARM_DESC(debug, "Debug enabled or not");
143MODULE_AUTHOR(DRIVER_AUTHOR);
144MODULE_DESCRIPTION(DRIVER_DESC);
145MODULE_LICENSE("GPL");
146
147module_param(debug, bool, S_IRUGO | S_IWUSR);
148MODULE_PARM_DESC(debug, "Debug enabled or not");