diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-05 12:21:27 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-05 20:26:28 +0200 |
commit | bc0495c41d397a85a8c8828bcb13e49a8d293762 (patch) | |
tree | 6ecaa1b11a71df226b69f876f58f818f9e839c0c /drivers/media/tuners/tea5767.c | |
parent | [media] tda18271: use prefix on all printk messages (diff) | |
download | linux-bc0495c41d397a85a8c8828bcb13e49a8d293762.tar.xz linux-bc0495c41d397a85a8c8828bcb13e49a8d293762.zip |
[media] tea5767: use module prefix on printed messages
use pr_fmt() & friends for error messages to output like:
[ 9.651721] tea5767: Chip ID is not zero. It is not a TEA5767
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/tuners/tea5767.c')
-rw-r--r-- | drivers/media/tuners/tea5767.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/tuners/tea5767.c b/drivers/media/tuners/tea5767.c index 36e85d81acb2..cd535cd4c071 100644 --- a/drivers/media/tuners/tea5767.c +++ b/drivers/media/tuners/tea5767.c @@ -10,6 +10,8 @@ * from their contributions on DScaler. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/i2c.h> #include <linux/slab.h> #include <linux/delay.h> @@ -370,17 +372,18 @@ int tea5767_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr) { struct tuner_i2c_props i2c = { .adap = i2c_adap, .addr = i2c_addr }; unsigned char buffer[7] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + int rc; if ((rc = tuner_i2c_xfer_recv(&i2c, buffer, 7))< 5) { - printk(KERN_WARNING "It is not a TEA5767. Received %i bytes.\n", rc); + pr_warn("It is not a TEA5767. Received %i bytes.\n", rc); return -EINVAL; } /* If all bytes are the same then it's a TV tuner and not a tea5767 */ if (buffer[0] == buffer[1] && buffer[0] == buffer[2] && buffer[0] == buffer[3] && buffer[0] == buffer[4]) { - printk(KERN_WARNING "All bytes are equal. It is not a TEA5767\n"); + pr_warn("All bytes are equal. It is not a TEA5767\n"); return -EINVAL; } @@ -390,7 +393,7 @@ int tea5767_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr) * Byte 5: bit 7:0 : == 0 */ if (((buffer[3] & 0x0f) != 0x00) || (buffer[4] != 0x00)) { - printk(KERN_WARNING "Chip ID is not zero. It is not a TEA5767\n"); + pr_warn("Chip ID is not zero. It is not a TEA5767\n"); return -EINVAL; } |