phidget.c 962 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * USB Phidgets class
  3. *
  4. * Copyright (C) 2006 Sean Young <sean@mess.org>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/module.h>
  13. #include <linux/init.h>
  14. #include <linux/err.h>
  15. #include <linux/device.h>
  16. struct class *phidget_class;
  17. static int __init init_phidget(void)
  18. {
  19. phidget_class = class_create(THIS_MODULE, "phidget");
  20. if (IS_ERR(phidget_class))
  21. return PTR_ERR(phidget_class);
  22. return 0;
  23. }
  24. static void __exit cleanup_phidget(void)
  25. {
  26. class_destroy(phidget_class);
  27. }
  28. EXPORT_SYMBOL_GPL(phidget_class);
  29. module_init(init_phidget);
  30. module_exit(cleanup_phidget);
  31. MODULE_LICENSE("GPL");
  32. MODULE_AUTHOR("Sean Young <sean@mess.org>");
  33. MODULE_DESCRIPTION("Container module for phidget class");