Skip to contentSkip to conversation

bluetooth: btmrvl_sdio: improve printk messages

PATCH In review Stefan Agner 2 participants 4 messages Jan 11, 2019 – Jan 18, 2019 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 bluetooth: btmrvl_sdio: improve printk messages

Use dev_* variants to print messages in drivers.

---
 drivers/bluetooth/btmrvl_sdio.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/bluetooth/btmrvl_sdio.c +4 -3
index fb3d03928460..6f9a1735039d 100644
@@ -62,13 +62,14 @@ static const struct of_device_id btmrvl_sdio_of_match_table[] = {
 static irqreturn_t btmrvl_wake_irq_bt(int irq, void *priv)
 {
 	struct btmrvl_sdio_card *card = priv;
+	struct device *dev = &card->func->dev;
 	struct btmrvl_plt_wake_cfg *cfg = card->plt_wake_cfg;
 
-	pr_info("%s: wake by bt\n", __func__);
+	dev_info(dev, "wake by bt\n");
 	cfg->wake_by_bt = true;
 	disable_irq_nosync(irq);
 
-	pm_wakeup_event(&card->func->dev, 0);
+	pm_wakeup_event(dev, 0);
 	pm_system_wakeup();
 
 	return IRQ_HANDLED;
@@ -87,7 +88,7 @@ static int btmrvl_sdio_probe_of(struct device *dev,
 
 	if (!dev->of_node ||
 	    !of_match_node(btmrvl_sdio_of_match_table, dev->of_node)) {
-		pr_err("sdio platform data not available\n");
+		dev_err(dev, "sdio platform data not available\n");
 		return -1;
 	}
 
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 bluetooth: btmrvl_sdio: lower log level of informational message

The platform specific wake-up interrupt is optional. Don't print an error message in case it is missing, merely inform the user in this case.

---
 drivers/bluetooth/btmrvl_sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/btmrvl_sdio.c +1 -1
index 6f9a1735039d..8ff4c31e0e48 100644
@@ -88,7 +88,7 @@ static int btmrvl_sdio_probe_of(struct device *dev,
 
 	if (!dev->of_node ||
 	    !of_match_node(btmrvl_sdio_of_match_table, dev->of_node)) {
-		dev_err(dev, "sdio platform data not available\n");
+		dev_info(dev, "sdio device tree data not available\n");
 		return -1;
 	}
 
Signature · 1 line
2.20.1
maintainer
#2 lore raw

Re: [PATCH 2/2] bluetooth: btmrvl_sdio: lower log level of informational message

Hi Stefan,

Quoted 8 lines

The platform specific wake-up interrupt is optional. Don't print an error message in case it is missing, merely inform the user in this case.

---
drivers/bluetooth/btmrvl_sdio.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel