aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-video.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-video.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-video.c')
-rw-r--r--drivers/media/video/cx88/cx88-video.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index b0dd4313a841..e158ea2454af 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -1818,7 +1818,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1818 err = request_irq(pci_dev->irq, cx8800_irq, 1818 err = request_irq(pci_dev->irq, cx8800_irq,
1819 IRQF_SHARED | IRQF_DISABLED, core->name, dev); 1819 IRQF_SHARED | IRQF_DISABLED, core->name, dev);
1820 if (err < 0) { 1820 if (err < 0) {
1821 printk(KERN_ERR "%s: can't get IRQ %d\n", 1821 printk(KERN_ERR "%s/0: can't get IRQ %d\n",
1822 core->name,pci_dev->irq); 1822 core->name,pci_dev->irq);
1823 goto fail_core; 1823 goto fail_core;
1824 } 1824 }
@@ -1837,7 +1837,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1837 err = video_register_device(dev->video_dev,VFL_TYPE_GRABBER, 1837 err = video_register_device(dev->video_dev,VFL_TYPE_GRABBER,
1838 video_nr[core->nr]); 1838 video_nr[core->nr]);
1839 if (err < 0) { 1839 if (err < 0) {
1840 printk(KERN_INFO "%s: can't register video device\n", 1840 printk(KERN_ERR "%s/0: can't register video device\n",
1841 core->name); 1841 core->name);
1842 goto fail_unreg; 1842 goto fail_unreg;
1843 } 1843 }
@@ -1848,7 +1848,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1848 err = video_register_device(dev->vbi_dev,VFL_TYPE_VBI, 1848 err = video_register_device(dev->vbi_dev,VFL_TYPE_VBI,
1849 vbi_nr[core->nr]); 1849 vbi_nr[core->nr]);
1850 if (err < 0) { 1850 if (err < 0) {
1851 printk(KERN_INFO "%s/0: can't register vbi device\n", 1851 printk(KERN_ERR "%s/0: can't register vbi device\n",
1852 core->name); 1852 core->name);
1853 goto fail_unreg; 1853 goto fail_unreg;
1854 } 1854 }
@@ -1861,7 +1861,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1861 err = video_register_device(dev->radio_dev,VFL_TYPE_RADIO, 1861 err = video_register_device(dev->radio_dev,VFL_TYPE_RADIO,
1862 radio_nr[core->nr]); 1862 radio_nr[core->nr]);
1863 if (err < 0) { 1863 if (err < 0) {
1864 printk(KERN_INFO "%s/0: can't register radio device\n", 1864 printk(KERN_ERR "%s/0: can't register radio device\n",
1865 core->name); 1865 core->name);
1866 goto fail_unreg; 1866 goto fail_unreg;
1867 } 1867 }
@@ -1885,8 +1885,8 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1885 core->kthread = kthread_run(cx88_audio_thread, core, "cx88 tvaudio"); 1885 core->kthread = kthread_run(cx88_audio_thread, core, "cx88 tvaudio");
1886 if (IS_ERR(core->kthread)) { 1886 if (IS_ERR(core->kthread)) {
1887 err = PTR_ERR(core->kthread); 1887 err = PTR_ERR(core->kthread);
1888 printk(KERN_ERR "Failed to create cx88 audio thread, err=%d\n", 1888 printk(KERN_ERR "%s/0: failed to create cx88 audio thread, err=%d\n",
1889 err); 1889 core->name, err);
1890 } 1890 }
1891 } 1891 }
1892 return 0; 1892 return 0;
@@ -1937,12 +1937,12 @@ static int cx8800_suspend(struct pci_dev *pci_dev, pm_message_t state)
1937 /* stop video+vbi capture */ 1937 /* stop video+vbi capture */
1938 spin_lock(&dev->slock); 1938 spin_lock(&dev->slock);
1939 if (!list_empty(&dev->vidq.active)) { 1939 if (!list_empty(&dev->vidq.active)) {
1940 printk("%s: suspend video\n", core->name); 1940 printk("%s/0: suspend video\n", core->name);
1941 stop_video_dma(dev); 1941 stop_video_dma(dev);
1942 del_timer(&dev->vidq.timeout); 1942 del_timer(&dev->vidq.timeout);
1943 } 1943 }
1944 if (!list_empty(&dev->vbiq.active)) { 1944 if (!list_empty(&dev->vbiq.active)) {
1945 printk("%s: suspend vbi\n", core->name); 1945 printk("%s/0: suspend vbi\n", core->name);
1946 cx8800_stop_vbi_dma(dev); 1946 cx8800_stop_vbi_dma(dev);
1947 del_timer(&dev->vbiq.timeout); 1947 del_timer(&dev->vbiq.timeout);
1948 } 1948 }
@@ -1968,8 +1968,8 @@ static int cx8800_resume(struct pci_dev *pci_dev)
1968 if (dev->state.disabled) { 1968 if (dev->state.disabled) {
1969 err=pci_enable_device(pci_dev); 1969 err=pci_enable_device(pci_dev);
1970 if (err) { 1970 if (err) {
1971 printk(KERN_ERR "%s: can't enable device\n", 1971 printk(KERN_ERR "%s/0: can't enable device\n",
1972 core->name); 1972 core->name);
1973 return err; 1973 return err;
1974 } 1974 }
1975 1975
@@ -1977,9 +1977,7 @@ static int cx8800_resume(struct pci_dev *pci_dev)
1977 } 1977 }
1978 err= pci_set_power_state(pci_dev, PCI_D0); 1978 err= pci_set_power_state(pci_dev, PCI_D0);
1979 if (err) { 1979 if (err) {
1980 printk(KERN_ERR "%s: can't enable device\n", 1980 printk(KERN_ERR "%s/0: can't set power state\n", core->name);
1981 core->name);
1982
1983 pci_disable_device(pci_dev); 1981 pci_disable_device(pci_dev);
1984 dev->state.disabled = 1; 1982 dev->state.disabled = 1;
1985 1983
@@ -1993,11 +1991,11 @@ static int cx8800_resume(struct pci_dev *pci_dev)
1993 /* restart video+vbi capture */ 1991 /* restart video+vbi capture */
1994 spin_lock(&dev->slock); 1992 spin_lock(&dev->slock);
1995 if (!list_empty(&dev->vidq.active)) { 1993 if (!list_empty(&dev->vidq.active)) {
1996 printk("%s: resume video\n", core->name); 1994 printk("%s/0: resume video\n", core->name);
1997 restart_video_queue(dev,&dev->vidq); 1995 restart_video_queue(dev,&dev->vidq);
1998 } 1996 }
1999 if (!list_empty(&dev->vbiq.active)) { 1997 if (!list_empty(&dev->vbiq.active)) {
2000 printk("%s: resume vbi\n", core->name); 1998 printk("%s/0: resume vbi\n", core->name);
2001 cx8800_restart_vbi_queue(dev,&dev->vbiq); 1999 cx8800_restart_vbi_queue(dev,&dev->vbiq);
2002 } 2000 }
2003 spin_unlock(&dev->slock); 2001 spin_unlock(&dev->slock);
@@ -2033,7 +2031,7 @@ static struct pci_driver cx8800_pci_driver = {
2033 2031
2034static int cx8800_init(void) 2032static int cx8800_init(void)
2035{ 2033{
2036 printk(KERN_INFO "cx2388x v4l2 driver version %d.%d.%d loaded\n", 2034 printk(KERN_INFO "cx88/0: cx2388x v4l2 driver version %d.%d.%d loaded\n",
2037 (CX88_VERSION_CODE >> 16) & 0xff, 2035 (CX88_VERSION_CODE >> 16) & 0xff,
2038 (CX88_VERSION_CODE >> 8) & 0xff, 2036 (CX88_VERSION_CODE >> 8) & 0xff,
2039 CX88_VERSION_CODE & 0xff); 2037 CX88_VERSION_CODE & 0xff);