aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/phidget.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2006-07-10 05:56:25 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 14:58:49 -0400
commit912b24c333843514ff77ed88961c6945f0f286ce (patch)
tree16b5617c0b92acb638a88ccf392e4d0d6dc910fc /drivers/usb/misc/phidget.c
parentd5176b413dcce85334e270021fc0d723d1714c84 (diff)
USB: Put phidgets driver in a sysfs class
This patch creates a device class phidget and add the phidget drivers to them. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/phidget.c')
-rw-r--r--drivers/usb/misc/phidget.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/usb/misc/phidget.c b/drivers/usb/misc/phidget.c
new file mode 100644
index 000000000000..735ed33f4f7f
--- /dev/null
+++ b/drivers/usb/misc/phidget.c
@@ -0,0 +1,43 @@
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
12#include <linux/kernel.h>
13#include <linux/module.h>
14#include <linux/init.h>
15#include <linux/err.h>
16#include <linux/device.h>
17
18struct class *phidget_class;
19
20static int __init init_phidget(void)
21{
22 phidget_class = class_create(THIS_MODULE, "phidget");
23
24 if (IS_ERR(phidget_class))
25 return PTR_ERR(phidget_class);
26
27 return 0;
28}
29
30static void __exit cleanup_phidget(void)
31{
32 class_destroy(phidget_class);
33}
34
35EXPORT_SYMBOL_GPL(phidget_class);
36
37module_init(init_phidget);
38module_exit(cleanup_phidget);
39
40MODULE_LICENSE("GPL");
41MODULE_AUTHOR("Sean Young <sean@mess.org>");
42MODULE_DESCRIPTION("Container module for phidget class");
43