summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/sddr09.c
diff options
context:
space:
mode:
authorVictor Dodon <printesoi@chromium.org>2016-02-17 19:42:37 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-21 05:21:53 +0100
commitef976ea33b4c44d6cd14ee63cb237c6bab40f91b (patch)
tree4406ace892e024ac0e81fd276892c5e56162c59e /drivers/usb/storage/sddr09.c
parentusb: usbtmc: Fix disconnect/poll interaction (diff)
downloadlinux-ef976ea33b4c44d6cd14ee63cb237c6bab40f91b.tar.xz
linux-ef976ea33b4c44d6cd14ee63cb237c6bab40f91b.zip
usb: storage: use usb_store_dbg instead of US_DEBUGPX
The US_DEBUGPX macro uses printk without specifying a kernel log level, so the default kernel log level is used, which may not match LOGLEVEL_DEBUG used in usb_stor_dbg. Remove the macro and use usb_store_dbg instead. Signed-off-by: Victor Dodon <printesoi@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage/sddr09.c')
-rw-r--r--drivers/usb/storage/sddr09.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c
index b74603689b9e..79224fcf9b59 100644
--- a/drivers/usb/storage/sddr09.c
+++ b/drivers/usb/storage/sddr09.c
@@ -1102,24 +1102,24 @@ static int
sddr09_get_wp(struct us_data *us, struct sddr09_card_info *info) {
int result;
unsigned char status;
+ const char *wp_fmt;
result = sddr09_read_status(us, &status);
if (result) {
usb_stor_dbg(us, "read_status fails\n");
return result;
}
- usb_stor_dbg(us, "status 0x%02X", status);
if ((status & 0x80) == 0) {
info->flags |= SDDR09_WP; /* write protected */
- US_DEBUGPX(" WP");
+ wp_fmt = " WP";
+ } else {
+ wp_fmt = "";
}
- if (status & 0x40)
- US_DEBUGPX(" Ready");
- if (status & LUNBITS)
- US_DEBUGPX(" Suspended");
- if (status & 0x1)
- US_DEBUGPX(" Error");
- US_DEBUGPX("\n");
+ usb_stor_dbg(us, "status 0x%02X%s%s%s%s\n", status, wp_fmt,
+ status & 0x40 ? " Ready" : "",
+ status & LUNBITS ? " Suspended" : "",
+ status & 0x01 ? " Error" : "");
+
return 0;
}