vivopay-serial.c 1012 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (C) 2001-2005 Greg Kroah-Hartman (greg@kroah.com)
  3. * Copyright (C) 2009 Outpost Embedded, LLC
  4. */
  5. #include <linux/kernel.h>
  6. #include <linux/init.h>
  7. #include <linux/tty.h>
  8. #include <linux/module.h>
  9. #include <linux/usb.h>
  10. #include <linux/usb/serial.h>
  11. #define DRIVER_VERSION "v1.0"
  12. #define DRIVER_DESC "ViVOpay USB Serial Driver"
  13. #define VIVOPAY_VENDOR_ID 0x1d5f
  14. static struct usb_device_id id_table [] = {
  15. /* ViVOpay 8800 */
  16. { USB_DEVICE(VIVOPAY_VENDOR_ID, 0x1004) },
  17. { },
  18. };
  19. MODULE_DEVICE_TABLE(usb, id_table);
  20. static struct usb_serial_driver vivopay_serial_device = {
  21. .driver = {
  22. .owner = THIS_MODULE,
  23. .name = "vivopay-serial",
  24. },
  25. .id_table = id_table,
  26. .num_ports = 1,
  27. };
  28. static struct usb_serial_driver * const serial_drivers[] = {
  29. &vivopay_serial_device, NULL
  30. };
  31. module_usb_serial_driver(serial_drivers, id_table);
  32. MODULE_AUTHOR("Forest Bond <forest.bond@outpostembedded.com>");
  33. MODULE_DESCRIPTION(DRIVER_DESC);
  34. MODULE_VERSION(DRIVER_VERSION);
  35. MODULE_LICENSE("GPL");