media: earthsoft: logging neatening
Subsystems (3)
PATCH 1/1 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_<level> 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 <[email protected]>
--- drivers/media/pci/pt1/pt1.c | 13 +++----- drivers/media/pci/pt3/pt3.c | 75 ++++++++++++++++++++++----------------------- 2 files changed, 41 insertions(+), 47 deletions(-)
drivers/media/pci/pt1/pt1.c +5 -8
@@ -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 ; }
drivers/media/pci/pt3/pt3.c +36 -39
245 lines not on this page · raw message