From patchwork Tue Nov 10 03:24:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vikram pandita X-Patchwork-Id: 58943 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAA3PVpt013459 for ; Tue, 10 Nov 2009 03:25:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755836AbZKJDZY (ORCPT ); Mon, 9 Nov 2009 22:25:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755731AbZKJDZX (ORCPT ); Mon, 9 Nov 2009 22:25:23 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:56578 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755366AbZKJDZX (ORCPT ); Mon, 9 Nov 2009 22:25:23 -0500 Received: from dlep35.itg.ti.com ([157.170.170.118]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id nAA3PGxO024409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Nov 2009 21:25:16 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id nAA3PDV5008961; Mon, 9 Nov 2009 21:25:13 -0600 (CST) Received: from vip-tid (lta0307903-128247075087.am.dhcp.ti.com [128.247.75.87]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id nAA3PDZ02340; Mon, 9 Nov 2009 21:25:13 -0600 (CST) Received: from vip-tid (localhost.localdomain [127.0.0.1]) by vip-tid (Postfix) with ESMTP id 94E1D29C8B1; Mon, 9 Nov 2009 21:24:34 -0600 (CST) Received: (from vikram@localhost) by vip-tid (8.14.3/8.14.3/Submit) id nAA3OYeA019400; Mon, 9 Nov 2009 21:24:34 -0600 X-Authentication-Warning: vip-tid: vikram set sender to vikram.pandita@ti.com using -f From: Vikram Pandita To: linux-usb@vger.kernel.org, dbrownell@users.sourceforge.net Cc: linux-omap@vger.kernel.org, Vikram Pandita , Anand Gadiyar Subject: [PATCH] usbtest: make module param pattern writeable Date: Mon, 9 Nov 2009 21:24:32 -0600 Message-Id: <1257823472-19369-1-git-send-email-vikram.pandita@ti.com> X-Mailer: git-send-email 1.6.5.1.69.g36942 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index a9f06d7..0aa04b7 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -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 = 0; +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;