-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Sean Young
authored and
Greg Kroah-Hartman
committed
Sep 27, 2006
1 parent
d5176b4
commit 912b24c
Showing
7 changed files
with
334 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* USB Phidgets class | ||
* | ||
* Copyright (C) 2006 Sean Young <sean@mess.org> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/module.h> | ||
#include <linux/init.h> | ||
#include <linux/err.h> | ||
#include <linux/device.h> | ||
|
||
struct class *phidget_class; | ||
|
||
static int __init init_phidget(void) | ||
{ | ||
phidget_class = class_create(THIS_MODULE, "phidget"); | ||
|
||
if (IS_ERR(phidget_class)) | ||
return PTR_ERR(phidget_class); | ||
|
||
return 0; | ||
} | ||
|
||
static void __exit cleanup_phidget(void) | ||
{ | ||
class_destroy(phidget_class); | ||
} | ||
|
||
EXPORT_SYMBOL_GPL(phidget_class); | ||
|
||
module_init(init_phidget); | ||
module_exit(cleanup_phidget); | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Sean Young <sean@mess.org>"); | ||
MODULE_DESCRIPTION("Container module for phidget class"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* USB Phidgets class | ||
* | ||
* Copyright (C) 2006 Sean Young <sean@mess.org> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
*/ | ||
|
||
extern struct class *phidget_class; |
Oops, something went wrong.