aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-05-02 19:49:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-11 13:06:02 -0400
commitf3a57fd148a4afd3c38f558c5b44972cb29ea8ba (patch)
tree7c1d553f33e2ed0d58c4a978ddd6be68ba592eb3 /drivers/net/wireless/libertas/main.c
parent0e4e06ae5e895864b4a4bca7eec2e3015fddca98 (diff)
libertas: Use netdev_<level> or dev_<level> where possible
Using the more descriptive logging styles gives a bit more information about the device being operated on. Makes the object trivially smaller too. $ size drivers/net/wireless/libertas/built-in.o.* 187730 2973 38488 229191 37f47 drivers/net/wireless/libertas/built-in.o.new 188195 2973 38488 229656 38118 drivers/net/wireless/libertas/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 1144afddd5eb..84d05a765b5b 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -444,8 +444,8 @@ static int lbs_thread(void *data)
444 if (priv->cmd_timed_out && priv->cur_cmd) { 444 if (priv->cmd_timed_out && priv->cur_cmd) {
445 struct cmd_ctrl_node *cmdnode = priv->cur_cmd; 445 struct cmd_ctrl_node *cmdnode = priv->cur_cmd;
446 446
447 pr_info("Timeout submitting command 0x%04x\n", 447 netdev_info(dev, "Timeout submitting command 0x%04x\n",
448 le16_to_cpu(cmdnode->cmdbuf->command)); 448 le16_to_cpu(cmdnode->cmdbuf->command));
449 lbs_complete_command(priv, cmdnode, -ETIMEDOUT); 449 lbs_complete_command(priv, cmdnode, -ETIMEDOUT);
450 if (priv->reset_card) 450 if (priv->reset_card)
451 priv->reset_card(priv); 451 priv->reset_card(priv);
@@ -472,7 +472,8 @@ static int lbs_thread(void *data)
472 * after firmware fixes it 472 * after firmware fixes it
473 */ 473 */
474 priv->psstate = PS_STATE_AWAKE; 474 priv->psstate = PS_STATE_AWAKE;
475 pr_alert("ignore PS_SleepConfirm in non-connected state\n"); 475 netdev_alert(dev,
476 "ignore PS_SleepConfirm in non-connected state\n");
476 } 477 }
477 } 478 }
478 479
@@ -566,7 +567,8 @@ int lbs_suspend(struct lbs_private *priv)
566 if (priv->is_deep_sleep) { 567 if (priv->is_deep_sleep) {
567 ret = lbs_set_deep_sleep(priv, 0); 568 ret = lbs_set_deep_sleep(priv, 0);
568 if (ret) { 569 if (ret) {
569 pr_err("deep sleep cancellation failed: %d\n", ret); 570 netdev_err(priv->dev,
571 "deep sleep cancellation failed: %d\n", ret);
570 return ret; 572 return ret;
571 } 573 }
572 priv->deep_sleep_required = 1; 574 priv->deep_sleep_required = 1;
@@ -599,7 +601,8 @@ int lbs_resume(struct lbs_private *priv)
599 priv->deep_sleep_required = 0; 601 priv->deep_sleep_required = 0;
600 ret = lbs_set_deep_sleep(priv, 1); 602 ret = lbs_set_deep_sleep(priv, 1);
601 if (ret) 603 if (ret)
602 pr_err("deep sleep activation failed: %d\n", ret); 604 netdev_err(priv->dev,
605 "deep sleep activation failed: %d\n", ret);
603 } 606 }
604 607
605 if (priv->setup_fw_on_resume) 608 if (priv->setup_fw_on_resume)
@@ -627,8 +630,8 @@ static void lbs_cmd_timeout_handler(unsigned long data)
627 if (!priv->cur_cmd) 630 if (!priv->cur_cmd)
628 goto out; 631 goto out;
629 632
630 pr_info("command 0x%04x timed out\n", 633 netdev_info(priv->dev, "command 0x%04x timed out\n",
631 le16_to_cpu(priv->cur_cmd->cmdbuf->command)); 634 le16_to_cpu(priv->cur_cmd->cmdbuf->command));
632 635
633 priv->cmd_timed_out = 1; 636 priv->cmd_timed_out = 1;
634 wake_up_interruptible(&priv->waitq); 637 wake_up_interruptible(&priv->waitq);
@@ -945,7 +948,7 @@ int lbs_start_card(struct lbs_private *priv)
945 948
946 lbs_debugfs_init_one(priv, dev); 949 lbs_debugfs_init_one(priv, dev);
947 950
948 pr_info("%s: Marvell WLAN 802.11 adapter\n", dev->name); 951 netdev_info(dev, "Marvell WLAN 802.11 adapter\n");
949 952
950 ret = 0; 953 ret = 0;
951 954
@@ -1072,14 +1075,16 @@ int lbs_get_firmware(struct device *dev, const char *user_helper,
1072 if (user_helper) { 1075 if (user_helper) {
1073 ret = request_firmware(helper, user_helper, dev); 1076 ret = request_firmware(helper, user_helper, dev);
1074 if (ret) { 1077 if (ret) {
1075 pr_err("couldn't find helper firmware %s", user_helper); 1078 dev_err(dev, "couldn't find helper firmware %s\n",
1079 user_helper);
1076 goto fail; 1080 goto fail;
1077 } 1081 }
1078 } 1082 }
1079 if (user_mainfw) { 1083 if (user_mainfw) {
1080 ret = request_firmware(mainfw, user_mainfw, dev); 1084 ret = request_firmware(mainfw, user_mainfw, dev);
1081 if (ret) { 1085 if (ret) {
1082 pr_err("couldn't find main firmware %s", user_mainfw); 1086 dev_err(dev, "couldn't find main firmware %s\n",
1087 user_mainfw);
1083 goto fail; 1088 goto fail;
1084 } 1089 }
1085 } 1090 }