Skip to content

Commit

Permalink
modem_if: make modem driver silent
Browse files Browse the repository at this point in the history
  • Loading branch information
Gokhan Moral committed Sep 5, 2012
1 parent 28375d0 commit 3c287f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/misc/modem_if/modem_link_device_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
*/

#define DEBUG
//#define DEBUG

#include <linux/init.h>
#include <linux/module.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/modem_if/modem_link_pm_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
*/

#define DEBUG
//#define DEBUG

#include <linux/init.h>
#include <linux/module.h>
Expand Down
4 changes: 4 additions & 0 deletions drivers/misc/modem_if/modem_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,17 @@ int pr_ipc(const char *str, const char *data, size_t len)
int pr_buffer(const char *tag, const char *data, size_t data_len,
size_t max_len)
{
#ifdef DEBUG
size_t len = min(data_len, max_len);
unsigned char hexstr[len ? len * 3 : 1]; /* 1 <= sizeof <= max_len*3 */
dump2hex(hexstr, data, len);

/* don't change this printk to mif_debug for print this as level7 */
return printk(KERN_INFO "%s(%u): %s%s\n", tag, data_len, hexstr,
len == data_len ? "" : " ...");
#else
return 0;
#endif
}

/* flow control CM from CP, it use in serial devices */
Expand Down

0 comments on commit 3c287f8

Please sign in to comment.