Commit 7f4e9854 authored by Vikram Pandita's avatar Vikram Pandita Committed by Greg Kroah-Hartman

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: default avatarVikram Pandita <vikram.pandita@ti.com>
Signed-off-by: default avatarAnand Gadiyar <gadiyar@ti.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ed7487c2
......@@ -213,8 +213,9 @@ static struct urb *simple_alloc_urb (
}
static unsigned pattern = 0;
module_param (pattern, uint, S_IRUGO);
MODULE_PARM_DESC(pattern, "i/o pattern (0 == zeroes)");
static unsigned mod_pattern;
module_param_named(pattern, mod_pattern, uint, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(mod_pattern, "i/o pattern (0 == zeroes)");
static inline void simple_fill_buf (struct urb *urb)
{
......@@ -1567,6 +1568,8 @@ usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf)
// FIXME USBDEVFS_CONNECTINFO doesn't say how fast the device is.
pattern = mod_pattern;
if (code != USBTEST_REQUEST)
return -EOPNOTSUPP;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment