From 509cd82619877b35dd5f5b4e6fde679d0c473e78 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Fri, 10 Oct 2014 18:10:49 -0300 Subject: [media] media: earthsoft: logging neatening Use dev_err instead of pt1_printk o reduce object code size o remove now unused pt1_printk macro Neaten dev_ uses in pt3 o add missing newlines o align arguments o remove unnecessary OOM messages as there's a generic one o typo fixes in messages Signed-off-by: Joe Perches Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/pt1/pt1.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'drivers/media/pci/pt1') diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c index db887b0c37b1..acc35b42e53c 100644 --- a/drivers/media/pci/pt1/pt1.c +++ b/drivers/media/pci/pt1/pt1.c @@ -109,9 +109,6 @@ struct pt1_adapter { int sleep; }; -#define pt1_printk(level, pt1, format, arg...) \ - dev_printk(level, &(pt1)->pdev->dev, format, ##arg) - static void pt1_write_reg(struct pt1 *pt1, int reg, u32 data) { writel(data, pt1->regs + reg * 4); @@ -154,7 +151,7 @@ static int pt1_sync(struct pt1 *pt1) return 0; pt1_write_reg(pt1, 0, 0x00000008); } - pt1_printk(KERN_ERR, pt1, "could not sync\n"); + dev_err(&pt1->pdev->dev, "could not sync\n"); return -EIO; } @@ -179,7 +176,7 @@ static int pt1_unlock(struct pt1 *pt1) return 0; schedule_timeout_uninterruptible((HZ + 999) / 1000); } - pt1_printk(KERN_ERR, pt1, "could not unlock\n"); + dev_err(&pt1->pdev->dev, "could not unlock\n"); return -EIO; } @@ -193,7 +190,7 @@ static int pt1_reset_pci(struct pt1 *pt1) return 0; schedule_timeout_uninterruptible((HZ + 999) / 1000); } - pt1_printk(KERN_ERR, pt1, "could not reset PCI\n"); + dev_err(&pt1->pdev->dev, "could not reset PCI\n"); return -EIO; } @@ -207,7 +204,7 @@ static int pt1_reset_ram(struct pt1 *pt1) return 0; schedule_timeout_uninterruptible((HZ + 999) / 1000); } - pt1_printk(KERN_ERR, pt1, "could not reset RAM\n"); + dev_err(&pt1->pdev->dev, "could not reset RAM\n"); return -EIO; } @@ -224,7 +221,7 @@ static int pt1_do_enable_ram(struct pt1 *pt1) } schedule_timeout_uninterruptible((HZ + 999) / 1000); } - pt1_printk(KERN_ERR, pt1, "could not enable RAM\n"); + dev_err(&pt1->pdev->dev, "could not enable RAM\n"); return -EIO; } -- cgit v1.2.3