[PATCH wireless-next 09/20] libertas: Use pr_<level>
Joe Perches
joe at perches.com
Fri Jun 15 01:53:49 EDT 2012
Use a more current logging style.
Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.
Signed-off-by: Joe Perches <joe at perches.com>
---
drivers/net/wireless/libertas/cmd.c | 2 ++
drivers/net/wireless/libertas/cmdresp.c | 2 ++
drivers/net/wireless/libertas/if_cs.c | 14 ++++++--------
drivers/net/wireless/libertas/if_sdio.c | 6 +++---
drivers/net/wireless/libertas/if_spi.c | 4 ++--
drivers/net/wireless/libertas/if_usb.c | 4 ++--
drivers/net/wireless/libertas/tx.c | 3 +++
7 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index d798bcc..7f7da1f 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -3,6 +3,8 @@
* It prepares command and sends it to firmware when it is ready.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/hardirq.h>
#include <linux/kfifo.h>
#include <linux/sched.h>
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 178b222..a15ac8e 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -3,6 +3,8 @@
* responses as well as events generated by firmware.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/hardirq.h>
#include <linux/slab.h>
#include <linux/delay.h>
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index 16beaf3..79ed0d0 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -110,14 +110,14 @@ static inline unsigned int if_cs_read8(struct if_cs_card *card, uint reg)
{
unsigned int val = ioread8(card->iobase + reg);
if (debug_output)
- printk(KERN_INFO "inb %08x<%02x\n", reg, val);
+ pr_info("inb %08x<%02x\n", reg, val);
return val;
}
static inline unsigned int if_cs_read16(struct if_cs_card *card, uint reg)
{
unsigned int val = ioread16(card->iobase + reg);
if (debug_output)
- printk(KERN_INFO "inw %08x<%04x\n", reg, val);
+ pr_info("inw %08x<%04x\n", reg, val);
return val;
}
static inline void if_cs_read16_rep(
@@ -127,22 +127,21 @@ static inline void if_cs_read16_rep(
unsigned long count)
{
if (debug_output)
- printk(KERN_INFO "insw %08x<(0x%lx words)\n",
- reg, count);
+ pr_info("insw %08x<(0x%lx words)\n", reg, count);
ioread16_rep(card->iobase + reg, buf, count);
}
static inline void if_cs_write8(struct if_cs_card *card, uint reg, u8 val)
{
if (debug_output)
- printk(KERN_INFO "outb %08x>%02x\n", reg, val);
+ pr_info("outb %08x>%02x\n", reg, val);
iowrite8(val, card->iobase + reg);
}
static inline void if_cs_write16(struct if_cs_card *card, uint reg, u16 val)
{
if (debug_output)
- printk(KERN_INFO "outw %08x>%04x\n", reg, val);
+ pr_info("outw %08x>%04x\n", reg, val);
iowrite16(val, card->iobase + reg);
}
@@ -153,8 +152,7 @@ static inline void if_cs_write16_rep(
unsigned long count)
{
if (debug_output)
- printk(KERN_INFO "outsw %08x>(0x%lx words)\n",
- reg, count);
+ pr_info("outsw %08x>(0x%lx words)\n", reg, count);
iowrite16_rep(card->iobase + reg, buf, count);
}
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index 76caeba..860555a 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -1063,7 +1063,7 @@ static void if_sdio_reset_card_worker(struct work_struct *work)
* instance for that reason.
*/
- pr_info("Resetting card...");
+ pr_info("Resetting card...\n");
mmc_remove_host(reset_host);
mmc_add_host(reset_host);
}
@@ -1391,8 +1391,8 @@ static int __init if_sdio_init_module(void)
lbs_deb_enter(LBS_DEB_SDIO);
- printk(KERN_INFO "libertas_sdio: Libertas SDIO driver\n");
- printk(KERN_INFO "libertas_sdio: Copyright Pierre Ossman\n");
+ pr_info("Libertas SDIO driver\n");
+ pr_info("Copyright Pierre Ossman\n");
ret = sdio_register_driver(&if_sdio_driver);
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index 9604a1c..aca22aa 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -624,7 +624,7 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card,
if (crc_err) {
/* Previous transfer failed. */
if (++num_crc_errs > MAX_MAIN_FW_LOAD_CRC_ERR) {
- pr_err("Too many CRC errors encountered in firmware load.\n");
+ pr_err("Too many CRC errors encountered in firmware load\n");
err = -EIO;
goto out;
}
@@ -1301,7 +1301,7 @@ static int __init if_spi_init_module(void)
{
int ret = 0;
lbs_deb_enter(LBS_DEB_SPI);
- printk(KERN_INFO "libertas_spi: Libertas SPI driver\n");
+ pr_info("Libertas SPI driver\n");
ret = spi_register_driver(&libertas_spi_driver);
lbs_deb_leave(LBS_DEB_SPI);
return ret;
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index cd3b0d4..8b5d0f3 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -180,7 +180,7 @@ static void if_usb_fw_timeo(unsigned long priv)
#ifdef CONFIG_OLPC
static void if_usb_reset_olpc_card(struct lbs_private *priv)
{
- printk(KERN_CRIT "Resetting OLPC wireless via EC...\n");
+ pr_crit("Resetting OLPC wireless via EC...\n");
olpc_ec_cmd(0x25, NULL, 0, NULL, 0);
}
#endif
@@ -544,7 +544,7 @@ static void if_usb_receive_fwload(struct urb *urb)
cardp->bootcmdresp = -1;
} else {
pr_info("boot cmd response wrong magic number (0x%x)\n",
- le32_to_cpu(bootcmdresp.magic));
+ le32_to_cpu(bootcmdresp.magic));
}
} else if ((bootcmdresp.cmd != BOOT_CMD_FW_BY_USB) &&
(bootcmdresp.cmd != BOOT_CMD_UPDATE_FW) &&
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c
index c025f9c..cb60fa4 100644
--- a/drivers/net/wireless/libertas/tx.c
+++ b/drivers/net/wireless/libertas/tx.c
@@ -1,6 +1,9 @@
/*
* This file contains the handling of TX in wlan driver.
*/
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/hardirq.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
--
1.7.8.111.gad25c.dirty
More information about the libertas-dev
mailing list