| Linux kernel & device driver programming |
| [ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] |
1 /* 1
2 * Motorola USB Phone driver
3 *
4 * Copyright (C) 2008 Greg Kroah-Hartman <greg
5 *
6 * This program is free software; you can red
7 * it under the terms of the GNU General Publ
8 * published by the Free Software Foundation.
9 *
10 * {sigh}
11 * Mororola should be using the CDC ACM USB sp
12 * they try to just "do their own thing"... T
13 * few phones in which a basic "dumb serial co
14 * able to get a connection through to them.
15 */
16
17 #include <linux/kernel.h>
18 #include <linux/init.h>
19 #include <linux/tty.h>
20 #include <linux/module.h>
21 #include <linux/usb.h>
22 #include <linux/usb/serial.h>
23
24 static struct usb_device_id id_table [] = {
25 { USB_DEVICE(0x05c6, 0x3197) }, /* unk
26 { USB_DEVICE(0x0c44, 0x0022) }, /* unk
27 { USB_DEVICE(0x22b8, 0x2a64) }, /* Mot
28 { USB_DEVICE(0x22b8, 0x2c64) }, /* Mot
29 { },
30 };
31 MODULE_DEVICE_TABLE(usb, id_table);
32
33 static struct usb_driver moto_driver = {
34 .name = "moto-modem",
35 .probe = usb_serial_probe,
36 .disconnect = usb_serial_disconnect,
37 .id_table = id_table,
38 .no_dynamic_id = 1,
39 };
40
41 static struct usb_serial_driver moto_device =
42 .driver = {
43 .owner = THIS_MODULE,
44 .name = "moto-modem",
45 },
46 .id_table = id_table,
47 .num_ports = 1,
48 };
49
50 static int __init moto_init(void)
51 {
52 int retval;
53
54 retval = usb_serial_register(&moto_dev
55 if (retval)
56 return retval;
57 retval = usb_register(&moto_driver);
58 if (retval)
59 usb_serial_deregister(&moto_de
60 return retval;
61 }
62
63 static void __exit moto_exit(void)
64 {
65 usb_deregister(&moto_driver);
66 usb_serial_deregister(&moto_device);
67 }
68
69 module_init(moto_init);
70 module_exit(moto_exit);
71 MODULE_LICENSE("GPL");
72
| This page was automatically generated by the LXR engine. |