From: Michal Nazarewicz <mina86@mina86.com>
To: Felipe Balbi <balbi@ti.com>, Alan Stern <stern@rowland.harvard.edu>
Cc: panto@antoniou-consulting.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
Michal Nazarewicz <mina86@mina86.com>
Subject: [PATCH] usb: gadget: f_mass_storage: change default value of the removable parameter
Date: Sat, 26 May 2012 16:32:39 -0700 [thread overview]
Message-ID: <9f033e3d3b2bcbdbf02253de540174479c0dd945.1338074060.git.mina86@mina86.com> (raw)
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 <mina86@mina86.com>
---
drivers/usb/gadget/f_mass_storage.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
Alternatively I can add a warning about the default being changed and
schedule the change for the future. Dunno if it's worth it.
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index f67b453..72116fa 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
@@ -3167,8 +3167,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]
@@ -3203,4 +3202,3 @@ fsg_common_from_params(struct fsg_common *common,
fsg_config_from_params(&cfg, params);
return fsg_common_init(common, cdev, &cfg);
}
-
--
1.7.7.3
next reply other threads:[~2012-05-26 23:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-26 23:32 Michal Nazarewicz [this message]
2012-05-27 16:03 ` Alan Stern
2012-05-27 20:59 ` Michal Nazarewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9f033e3d3b2bcbdbf02253de540174479c0dd945.1338074060.git.mina86@mina86.com \
--to=mina86@mina86.com \
--cc=balbi@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=panto@antoniou-consulting.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®