diff options
Diffstat (limited to 'drivers/usb/misc/cypress_cy7c63.c')
| -rw-r--r-- | drivers/usb/misc/cypress_cy7c63.c | 29 | 
1 files changed, 3 insertions, 26 deletions
diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c index 2f43c57743c..402b94dd253 100644 --- a/drivers/usb/misc/cypress_cy7c63.c +++ b/drivers/usb/misc/cypress_cy7c63.c @@ -29,7 +29,6 @@  *	published by the Free Software Foundation, version 2.  */ -#include <linux/init.h>  #include <linux/module.h>  #include <linux/kernel.h>  #include <linux/slab.h> @@ -196,11 +195,9 @@ static ssize_t get_port1_handler(struct device *dev,  	return read_port(dev, attr, buf, 1, CYPRESS_READ_PORT_ID1);  } -static DEVICE_ATTR(port0, S_IWUGO | S_IRUGO, -		   get_port0_handler, set_port0_handler); +static DEVICE_ATTR(port0, S_IRUGO | S_IWUSR, get_port0_handler, set_port0_handler); -static DEVICE_ATTR(port1, S_IWUGO | S_IRUGO, -		   get_port1_handler, set_port1_handler); +static DEVICE_ATTR(port1, S_IRUGO | S_IWUSR, get_port1_handler, set_port1_handler);  static int cypress_probe(struct usb_interface *interface, @@ -273,27 +270,7 @@ static struct usb_driver cypress_driver = {  	.id_table = cypress_table,  }; -static int __init cypress_init(void) -{ -	int result; - -	/* register this driver with the USB subsystem */ -	result = usb_register(&cypress_driver); -	if (result) -		printk(KERN_ERR KBUILD_MODNAME ": usb_register failed! " -		       "Error number: %d\n", result); - -	return result; -} - -static void __exit cypress_exit(void) -{ -	/* deregister this driver with the USB subsystem */ -	usb_deregister(&cypress_driver); -} - -module_init(cypress_init); -module_exit(cypress_exit); +module_usb_driver(cypress_driver);  MODULE_AUTHOR(DRIVER_AUTHOR);  MODULE_DESCRIPTION(DRIVER_DESC);  | 
