From patchwork Mon Feb 18 02:05:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Do Q.Thang" X-Patchwork-Id: 2154921 Return-Path: X-Original-To: patchwork-ltsi-dev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) by patchwork2.kernel.org (Postfix) with ESMTP id 8998DDF283 for ; Mon, 18 Feb 2013 02:06:03 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [IPv6:::1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 5D566306; Mon, 18 Feb 2013 02:06:03 +0000 (UTC) X-Original-To: ltsi-dev@lists.linuxfoundation.org Delivered-To: ltsi-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTP id 8BA5B306 for ; Mon, 18 Feb 2013 02:06:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.omesemicon.co.jp.omesemicon.co.jp (219-118-191-130.cust.bit-drive.ne.jp [219.118.191.130]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id BE60B1FD2B for ; Mon, 18 Feb 2013 02:06:00 +0000 (UTC) Received: from [192.168.11.3] by [192.168.11.254] with ESMTP; Mon, 18 Feb 2013 11:05:59 +0900 Received: from localhost (p14010-ipadfx41marunouchi.tokyo.ocn.ne.jp [61.118.107.10]) by mail.omesemicon.co.jp.omesemicon.co.jp (8.13.1/3.7W) with ESMTP id r1I25gHC000697; Mon, 18 Feb 2013 11:05:42 +0900 From: Do Quang Thang To: Greg KH Date: Mon, 18 Feb 2013 11:05:32 +0900 Message-Id: <1361153138-5365-2-git-send-email-dq-thang@jinso.co.jp> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1361153138-5365-1-git-send-email-dq-thang@jinso.co.jp> References: <20130215232435.GA26625@kroah.com> <1361153138-5365-1-git-send-email-dq-thang@jinso.co.jp> MIME-Version: 1.0 X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00, RCVD_DOUBLE_IP_LOOSE, RDNS_DYNAMIC autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: ltsi-dev@lists.linuxfoundation.org Subject: [LTSI-dev] =?utf-8?q?=5BPATCH_03/10=5D_usb=3A_gadget=3A_f=5Fmass?= =?utf-8?q?=5Fstorage=3A_change_default_value_of_the_removable_para?= =?utf-8?q?meter?= X-BeenThere: ltsi-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "A list to discuss patches, development, and other things related to the LTSI project" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ltsi-dev-bounces@lists.linuxfoundation.org Errors-To: ltsi-dev-bounces@lists.linuxfoundation.org From: Michal Nazarewicz This commit changes the default value of the removable module parameter from ā€œyā€ to ā€œnā€. This comes with line with file_storag's default and seems to be a better default. Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi (cherry picked from commit fa84c57516f6da93ebc2601348043e9bcb7b4b4d) Signed-off-by: Do Quang Thang --- drivers/usb/gadget/f_mass_storage.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index cb8c162..e65a95e 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -124,7 +124,7 @@ * backing storage. * ro=b[,b...] Default false, boolean for read-only access. * removable=b[,b...] - * Default true, boolean for removable media. + * Default false, boolean for removable media. * cdrom=b[,b...] Default false, boolean for whether to emulate * a CD-ROM drive. * nofua=b[,b...] Default false, booleans for ignore FUA flag @@ -3174,8 +3174,7 @@ fsg_config_from_params(struct fsg_config *cfg, for (i = 0, lun = cfg->luns; i < cfg->nluns; ++i, ++lun) { lun->ro = !!params->ro[i]; lun->cdrom = !!params->cdrom[i]; - lun->removable = /* Removable by default */ - params->removable_count <= i || params->removable[i]; + lun->removable = !!params->removable[i]; lun->filename = params->file_count > i && params->file[i][0] ? params->file[i] @@ -3210,4 +3209,3 @@ fsg_common_from_params(struct fsg_common *common, fsg_config_from_params(&cfg, params); return fsg_common_init(common, cdev, &cfg); } -