aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-mpeg.c
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-08-15 13:41:59 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:05:17 -0400
commit5772f81326904f2bfbb2bf2f365b3fb36ee3b7d8 (patch)
tree04ac6ac3478ddd9d5692ba44ae92d8bed81fe51f /drivers/media/video/cx88/cx88-mpeg.c
parentbbc83597dfe3093b161014e6ebb351279eabaa7c (diff)
V4L/DVB (6023): cx88: Clean up some ugly and inconsistent printk()s
Get rid of the "CORE" prefix from cx88 printks. It was only used a few times, and it makes it look like they're coming from the kernel core or something. Fix the message, "TV tuner 60 at 0x1fe, Radio tuner -1 at 0x1fe", by adding a "cx88[0]" prefix to be consistent, and to keep people who grep their dmesg output for cx88 from missing it. Get rid of the addresses, which are always wrong. The addresses are always set to -1, but because it's an unsigned 8-bit value, the left shift converts it to the nonsense address 0x1fe. In the cx8802 driver, some cut and pasted code prefixed lines with "CORE cx88[0]:", which has been changed to "cx88[0]/2:" like the other printks from the cx8802 driver. Also fix some ugly printks in the cx8802 driver that used __FUNCTION__ for KERN_INFO and KERN_ERR messages. The changed printks in cx88-mpeg.c also needed lots of whitespace and 80-column fixes. A bunch of misc changes in cx88-dvb.c and cx88-video.c to add message levels or a consistent "cx88[?]/2" or "cx88[?]/0" prefix. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-mpeg.c')
-rw-r--r--drivers/media/video/cx88/cx88-mpeg.c42
1 files changed, 25 insertions, 17 deletions
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c
index 1df245ace2d0..5da47e251e66 100644
--- a/drivers/media/video/cx88/cx88-mpeg.c
+++ b/drivers/media/video/cx88/cx88-mpeg.c
@@ -675,22 +675,24 @@ int cx8802_register_driver(struct cx8802_driver *drv)
675 struct list_head *list; 675 struct list_head *list;
676 int err = 0, i = 0; 676 int err = 0, i = 0;
677 677
678 printk(KERN_INFO "%s() ->registering driver type=%s access=%s\n", __FUNCTION__ , 678 printk(KERN_INFO
679 drv->type_id == CX88_MPEG_DVB ? "dvb" : "blackbird", 679 "cx88/2: registering cx8802 driver, type: %s access: %s\n",
680 drv->hw_access == CX8802_DRVCTL_SHARED ? "shared" : "exclusive"); 680 drv->type_id == CX88_MPEG_DVB ? "dvb" : "blackbird",
681 drv->hw_access == CX8802_DRVCTL_SHARED ? "shared" : "exclusive");
681 682
682 if ((err = cx8802_check_driver(drv)) != 0) { 683 if ((err = cx8802_check_driver(drv)) != 0) {
683 printk(KERN_INFO "%s() cx8802_driver is invalid\n", __FUNCTION__ ); 684 printk(KERN_ERR "cx88/2: cx8802_driver is invalid\n");
684 return err; 685 return err;
685 } 686 }
686 687
687 list_for_each(list,&cx8802_devlist) { 688 list_for_each(list,&cx8802_devlist) {
688 h = list_entry(list, struct cx8802_dev, devlist); 689 h = list_entry(list, struct cx8802_dev, devlist);
689 690
690 printk(KERN_INFO "CORE %s: subsystem: %04x:%04x, board: %s [card=%d]\n", 691 printk(KERN_INFO
691 h->core->name,h->pci->subsystem_vendor, 692 "%s/2: subsystem: %04x:%04x, board: %s [card=%d]\n",
692 h->pci->subsystem_device,h->core->board.name, 693 h->core->name, h->pci->subsystem_vendor,
693 h->core->boardnr); 694 h->pci->subsystem_device, h->core->board.name,
695 h->core->boardnr);
694 696
695 /* Bring up a new struct for each driver instance */ 697 /* Bring up a new struct for each driver instance */
696 driver = kzalloc(sizeof(*drv),GFP_KERNEL); 698 driver = kzalloc(sizeof(*drv),GFP_KERNEL);
@@ -712,7 +714,9 @@ int cx8802_register_driver(struct cx8802_driver *drv)
712 list_add_tail(&driver->devlist,&h->drvlist.devlist); 714 list_add_tail(&driver->devlist,&h->drvlist.devlist);
713 mutex_unlock(&drv->core->lock); 715 mutex_unlock(&drv->core->lock);
714 } else { 716 } else {
715 printk(KERN_ERR "%s() ->probe failed err = %d\n", __FUNCTION__, err); 717 printk(KERN_ERR
718 "%s/2: cx8802 probe failed, err = %d\n",
719 h->core->name, err);
716 } 720 }
717 721
718 } 722 }
@@ -732,17 +736,20 @@ int cx8802_unregister_driver(struct cx8802_driver *drv)
732 struct list_head *list2, *q; 736 struct list_head *list2, *q;
733 int err = 0, i = 0; 737 int err = 0, i = 0;
734 738
735 printk(KERN_INFO "%s() ->unregistering driver type=%s\n", __FUNCTION__ , 739 printk(KERN_INFO
736 drv->type_id == CX88_MPEG_DVB ? "dvb" : "blackbird"); 740 "cx88/2: unregistering cx8802 driver, type: %s access: %s\n",
741 drv->type_id == CX88_MPEG_DVB ? "dvb" : "blackbird",
742 drv->hw_access == CX8802_DRVCTL_SHARED ? "shared" : "exclusive");
737 743
738 list_for_each(list,&cx8802_devlist) { 744 list_for_each(list,&cx8802_devlist) {
739 i++; 745 i++;
740 h = list_entry(list, struct cx8802_dev, devlist); 746 h = list_entry(list, struct cx8802_dev, devlist);
741 747
742 printk(KERN_INFO "CORE %s: subsystem: %04x:%04x, board: %s [card=%d]\n", 748 printk(KERN_INFO
743 h->core->name,h->pci->subsystem_vendor, 749 "%s/2: subsystem: %04x:%04x, board: %s [card=%d]\n",
744 h->pci->subsystem_device,h->core->board.name, 750 h->core->name, h->pci->subsystem_vendor,
745 h->core->boardnr); 751 h->pci->subsystem_device, h->core->board.name,
752 h->core->boardnr);
746 753
747 list_for_each_safe(list2, q, &h->drvlist.devlist) { 754 list_for_each_safe(list2, q, &h->drvlist.devlist) {
748 d = list_entry(list2, struct cx8802_driver, devlist); 755 d = list_entry(list2, struct cx8802_driver, devlist);
@@ -757,7 +764,8 @@ int cx8802_unregister_driver(struct cx8802_driver *drv)
757 list_del(list2); 764 list_del(list2);
758 mutex_unlock(&drv->core->lock); 765 mutex_unlock(&drv->core->lock);
759 } else 766 } else
760 printk(KERN_ERR "%s() ->remove failed err = %d\n", __FUNCTION__, err); 767 printk(KERN_ERR "%s/2: cx8802 driver remove "
768 "failed (%d)\n", h->core->name, err);
761 769
762 } 770 }
763 771
@@ -865,7 +873,7 @@ static struct pci_driver cx8802_pci_driver = {
865 873
866static int cx8802_init(void) 874static int cx8802_init(void)
867{ 875{
868 printk(KERN_INFO "cx2388x cx88-mpeg Driver Manager version %d.%d.%d loaded\n", 876 printk(KERN_INFO "cx88/2: cx2388x MPEG-TS Driver Manager version %d.%d.%d loaded\n",
869 (CX88_VERSION_CODE >> 16) & 0xff, 877 (CX88_VERSION_CODE >> 16) & 0xff,
870 (CX88_VERSION_CODE >> 8) & 0xff, 878 (CX88_VERSION_CODE >> 8) & 0xff,
871 CX88_VERSION_CODE & 0xff); 879 CX88_VERSION_CODE & 0xff);