aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorVikram Pandita <vikram.pandita@ti.com>2009-11-09 22:24:32 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 14:55:22 -0500
commit7f4e985448e82fe4a1cc0ae4fcecaf7e0301c07b (patch)
tree53325354cd6ceac171944c77cd921a0b5c630c3b /drivers/usb/misc
parented7487c2c28560a6b06900851ab63ebca1aea444 (diff)
usbtest: make module param pattern writeable
Allow module_param to be writeable. This allows us to change the parameter if usbtest is built-in in the kernel. Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/usbtest.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index a9f06d76960f..3dab0c0b196f 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -213,8 +213,9 @@ static struct urb *simple_alloc_urb (
213} 213}
214 214
215static unsigned pattern = 0; 215static unsigned pattern = 0;
216module_param (pattern, uint, S_IRUGO); 216static unsigned mod_pattern;
217MODULE_PARM_DESC(pattern, "i/o pattern (0 == zeroes)"); 217module_param_named(pattern, mod_pattern, uint, S_IRUGO | S_IWUSR);
218MODULE_PARM_DESC(mod_pattern, "i/o pattern (0 == zeroes)");
218 219
219static inline void simple_fill_buf (struct urb *urb) 220static inline void simple_fill_buf (struct urb *urb)
220{ 221{
@@ -1567,6 +1568,8 @@ usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf)
1567 1568
1568 // FIXME USBDEVFS_CONNECTINFO doesn't say how fast the device is. 1569 // FIXME USBDEVFS_CONNECTINFO doesn't say how fast the device is.
1569 1570
1571 pattern = mod_pattern;
1572
1570 if (code != USBTEST_REQUEST) 1573 if (code != USBTEST_REQUEST)
1571 return -EOPNOTSUPP; 1574 return -EOPNOTSUPP;
1572 1575