On 06/21/2017 08:20 PM, Mauro Carvalho Chehab wrote:
Em Wed, 21 Jun 2017 19:14:40 +0200
Daniel Scheller <d.scheller.oss@xxxxxxxxx> escreveu:
Am Wed, 21 Jun 2017 14:08:08 -0300
schrieb Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>:
Em Wed, 21 Jun 2017 18:53:47 +0200
Daniel Scheller <d.scheller.oss@xxxxxxxxx> escreveu:
From: Daniel Scheller <d.scheller@xxxxxxx>
Side effect: KERN_DEBUG messages aren't written to the kernel log anymore.
This also improves the tda18212_ping reporting a bit so users know that if
pinging wasn't successful, bad things will happen.
Since in module_init_ddbridge() there's no dev yet, pr_info is used
instead.
Signed-off-by: Daniel Scheller <d.scheller@xxxxxxx>
---
drivers/media/pci/ddbridge/ddbridge-core.c | 78 ++++++++++++++++++------------
1 file changed, 46 insertions(+), 32 deletions(-)
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c
index 9420479bee9a..540a121eadd6 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -17,6 +17,8 @@
* http://www.gnu.org/copyleft/gpl.html
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
I guess this is a left over from the old patch. When you use dev_foo,
it will get the driver's name from dev->name. So, no need to do the
above.
I intentionally left this in for the pr_info used in module_init_ddbridge(). If you prefer, we can ofc probably also leave this as printk like
printk(KERN_INFO KBUILD_MODNAME ": Digital...");
Ah, OK!
But why you even need it? Probe should be first place you need to print
something and there is always proper device pointer.
Antti
--
http://palosaari.fi/