summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/option_ms.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-04-19 11:44:00 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-19 11:46:50 -0700
commit191648d03d20229523d9a75b8abef56421298d28 (patch)
tree2de4891a95fe1d2ee4b8326bb9834033b763d37e /drivers/usb/storage/option_ms.c
parentf1175daa5312dd1b3f5940413c7c41ed195066f7 (diff)
downloadblackbird-op-linux-191648d03d20229523d9a75b8abef56421298d28.tar.gz
blackbird-op-linux-191648d03d20229523d9a75b8abef56421298d28.zip
usb: storage: Convert US_DEBUGP to usb_stor_dbg
Use a more current logging style with dev_printk where possible. o Convert uses of US_DEBUGP to usb_stor_dbg o Add "struct us_data *" to usb_stor_dbg uses o usb_stor_dbg now uses struct device */dev_vprint_emit o Removed embedded function names o Coalesce formats o Remove trailing whitespace o Remove useless OOM messages o Remove useless function entry/exit logging o Convert some US_DEBUGP uses to dev_info and dev_dbg Object size is slightly reduced when debugging is enabled, slightly increased with no debugging because some initialization and removal messages are now always emitted. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage/option_ms.c')
-rw-r--r--drivers/usb/storage/option_ms.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/usb/storage/option_ms.c b/drivers/usb/storage/option_ms.c
index e0f76bb05915..b2b35b1d7de8 100644
--- a/drivers/usb/storage/option_ms.c
+++ b/drivers/usb/storage/option_ms.c
@@ -50,7 +50,7 @@ static int option_rezero(struct us_data *us)
char *buffer;
int result;
- US_DEBUGP("Option MS: %s", "DEVICE MODE SWITCH\n");
+ usb_stor_dbg(us, "Option MS: %s\n", "DEVICE MODE SWITCH");
buffer = kzalloc(RESPONSE_LEN, GFP_KERNEL);
if (buffer == NULL)
@@ -95,7 +95,7 @@ static int option_inquiry(struct us_data *us)
char *buffer;
int result;
- US_DEBUGP("Option MS: %s", "device inquiry for vendor name\n");
+ usb_stor_dbg(us, "Option MS: %s\n", "device inquiry for vendor name");
buffer = kzalloc(0x24, GFP_KERNEL);
if (buffer == NULL)
@@ -138,31 +138,32 @@ int option_ms_init(struct us_data *us)
{
int result;
- US_DEBUGP("Option MS: option_ms_init called\n");
+ usb_stor_dbg(us, "Option MS: %s\n", "option_ms_init called");
/* Additional test for vendor information via INQUIRY,
* because some vendor/product IDs are ambiguous
*/
result = option_inquiry(us);
if (result != 0) {
- US_DEBUGP("Option MS: vendor is not Option or not determinable,"
- " no action taken\n");
+ usb_stor_dbg(us, "Option MS: %s\n",
+ "vendor is not Option or not determinable, no action taken");
return 0;
} else
- US_DEBUGP("Option MS: this is a genuine Option device,"
- " proceeding\n");
+ usb_stor_dbg(us, "Option MS: %s\n",
+ "this is a genuine Option device, proceeding");
/* Force Modem mode */
if (option_zero_cd == ZCD_FORCE_MODEM) {
- US_DEBUGP("Option MS: %s", "Forcing Modem Mode\n");
+ usb_stor_dbg(us, "Option MS: %s\n", "Forcing Modem Mode");
result = option_rezero(us);
if (result != USB_STOR_XFER_GOOD)
- US_DEBUGP("Option MS: Failed to switch to modem mode.\n");
+ usb_stor_dbg(us, "Option MS: %s\n",
+ "Failed to switch to modem mode");
return -EIO;
} else if (option_zero_cd == ZCD_ALLOW_MS) {
/* Allow Mass Storage mode (keep CD-Rom) */
- US_DEBUGP("Option MS: %s", "Allowing Mass Storage Mode if device"
- " requests it\n");
+ usb_stor_dbg(us, "Option MS: %s\n",
+ "Allowing Mass Storage Mode if device requests it");
}
return 0;
OpenPOWER on IntegriCloud