diff options
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-417.c | 6 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-audio.c | 30 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-avcore.c | 126 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-cards.c | 72 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-core.c | 54 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-dvb.c | 12 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-i2c.c | 12 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c | 24 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-vbi.c | 28 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-video.c | 52 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx.h | 19 |
11 files changed, 210 insertions, 225 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c index 459bb0e98971..d678f4587ab4 100644 --- a/drivers/media/usb/cx231xx/cx231xx-417.c +++ b/drivers/media/usb/cx231xx/cx231xx-417.c | |||
@@ -24,6 +24,8 @@ | |||
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "cx231xx.h" | ||
28 | |||
27 | #include <linux/module.h> | 29 | #include <linux/module.h> |
28 | #include <linux/moduleparam.h> | 30 | #include <linux/moduleparam.h> |
29 | #include <linux/init.h> | 31 | #include <linux/init.h> |
@@ -39,8 +41,6 @@ | |||
39 | #include <media/tuner.h> | 41 | #include <media/tuner.h> |
40 | #include <linux/usb.h> | 42 | #include <linux/usb.h> |
41 | 43 | ||
42 | #include "cx231xx.h" | ||
43 | |||
44 | #define CX231xx_FIRM_IMAGE_SIZE 376836 | 44 | #define CX231xx_FIRM_IMAGE_SIZE 376836 |
45 | #define CX231xx_FIRM_IMAGE_NAME "v4l-cx23885-enc.fw" | 45 | #define CX231xx_FIRM_IMAGE_NAME "v4l-cx23885-enc.fw" |
46 | 46 | ||
@@ -1416,7 +1416,7 @@ static int bb_buf_prepare(struct videobuf_queue *q, | |||
1416 | if (!dev->video_mode.bulk_ctl.num_bufs) | 1416 | if (!dev->video_mode.bulk_ctl.num_bufs) |
1417 | urb_init = 1; | 1417 | urb_init = 1; |
1418 | } | 1418 | } |
1419 | /*cx231xx_info("urb_init=%d dev->video_mode.max_pkt_size=%d\n", | 1419 | /*pr_info("urb_init=%d dev->video_mode.max_pkt_size=%d\n", |
1420 | urb_init, dev->video_mode.max_pkt_size);*/ | 1420 | urb_init, dev->video_mode.max_pkt_size);*/ |
1421 | dev->mode_tv = 1; | 1421 | dev->mode_tv = 1; |
1422 | 1422 | ||
diff --git a/drivers/media/usb/cx231xx/cx231xx-audio.c b/drivers/media/usb/cx231xx/cx231xx-audio.c index 9b925874d392..8312388edabb 100644 --- a/drivers/media/usb/cx231xx/cx231xx-audio.c +++ b/drivers/media/usb/cx231xx/cx231xx-audio.c | |||
@@ -20,6 +20,7 @@ | |||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include "cx231xx.h" | ||
23 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
24 | #include <linux/usb.h> | 25 | #include <linux/usb.h> |
25 | #include <linux/init.h> | 26 | #include <linux/init.h> |
@@ -37,7 +38,6 @@ | |||
37 | #include <sound/initval.h> | 38 | #include <sound/initval.h> |
38 | #include <sound/control.h> | 39 | #include <sound/control.h> |
39 | #include <media/v4l2-common.h> | 40 | #include <media/v4l2-common.h> |
40 | #include "cx231xx.h" | ||
41 | 41 | ||
42 | static int debug; | 42 | static int debug; |
43 | module_param(debug, int, 0644); | 43 | module_param(debug, int, 0644); |
@@ -182,7 +182,7 @@ static void cx231xx_audio_isocirq(struct urb *urb) | |||
182 | 182 | ||
183 | status = usb_submit_urb(urb, GFP_ATOMIC); | 183 | status = usb_submit_urb(urb, GFP_ATOMIC); |
184 | if (status < 0) { | 184 | if (status < 0) { |
185 | cx231xx_errdev("resubmit of audio urb failed (error=%i)\n", | 185 | pr_err("resubmit of audio urb failed (error=%i)\n", |
186 | status); | 186 | status); |
187 | } | 187 | } |
188 | return; | 188 | return; |
@@ -266,7 +266,7 @@ static void cx231xx_audio_bulkirq(struct urb *urb) | |||
266 | 266 | ||
267 | status = usb_submit_urb(urb, GFP_ATOMIC); | 267 | status = usb_submit_urb(urb, GFP_ATOMIC); |
268 | if (status < 0) { | 268 | if (status < 0) { |
269 | cx231xx_errdev("resubmit of audio urb failed (error=%i)\n", | 269 | pr_err("resubmit of audio urb failed (error=%i)\n", |
270 | status); | 270 | status); |
271 | } | 271 | } |
272 | return; | 272 | return; |
@@ -277,7 +277,7 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev) | |||
277 | int i, errCode; | 277 | int i, errCode; |
278 | int sb_size; | 278 | int sb_size; |
279 | 279 | ||
280 | cx231xx_info("%s: Starting ISO AUDIO transfers\n", __func__); | 280 | pr_info("%s: Starting ISO AUDIO transfers\n", __func__); |
281 | 281 | ||
282 | if (dev->state & DEV_DISCONNECTED) | 282 | if (dev->state & DEV_DISCONNECTED) |
283 | return -ENODEV; | 283 | return -ENODEV; |
@@ -295,7 +295,7 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev) | |||
295 | memset(dev->adev.transfer_buffer[i], 0x80, sb_size); | 295 | memset(dev->adev.transfer_buffer[i], 0x80, sb_size); |
296 | urb = usb_alloc_urb(CX231XX_ISO_NUM_AUDIO_PACKETS, GFP_ATOMIC); | 296 | urb = usb_alloc_urb(CX231XX_ISO_NUM_AUDIO_PACKETS, GFP_ATOMIC); |
297 | if (!urb) { | 297 | if (!urb) { |
298 | cx231xx_errdev("usb_alloc_urb failed!\n"); | 298 | pr_err("usb_alloc_urb failed!\n"); |
299 | for (j = 0; j < i; j++) { | 299 | for (j = 0; j < i; j++) { |
300 | usb_free_urb(dev->adev.urb[j]); | 300 | usb_free_urb(dev->adev.urb[j]); |
301 | kfree(dev->adev.transfer_buffer[j]); | 301 | kfree(dev->adev.transfer_buffer[j]); |
@@ -338,7 +338,7 @@ static int cx231xx_init_audio_bulk(struct cx231xx *dev) | |||
338 | int i, errCode; | 338 | int i, errCode; |
339 | int sb_size; | 339 | int sb_size; |
340 | 340 | ||
341 | cx231xx_info("%s: Starting BULK AUDIO transfers\n", __func__); | 341 | pr_info("%s: Starting BULK AUDIO transfers\n", __func__); |
342 | 342 | ||
343 | if (dev->state & DEV_DISCONNECTED) | 343 | if (dev->state & DEV_DISCONNECTED) |
344 | return -ENODEV; | 344 | return -ENODEV; |
@@ -356,7 +356,7 @@ static int cx231xx_init_audio_bulk(struct cx231xx *dev) | |||
356 | memset(dev->adev.transfer_buffer[i], 0x80, sb_size); | 356 | memset(dev->adev.transfer_buffer[i], 0x80, sb_size); |
357 | urb = usb_alloc_urb(CX231XX_NUM_AUDIO_PACKETS, GFP_ATOMIC); | 357 | urb = usb_alloc_urb(CX231XX_NUM_AUDIO_PACKETS, GFP_ATOMIC); |
358 | if (!urb) { | 358 | if (!urb) { |
359 | cx231xx_errdev("usb_alloc_urb failed!\n"); | 359 | pr_err("usb_alloc_urb failed!\n"); |
360 | for (j = 0; j < i; j++) { | 360 | for (j = 0; j < i; j++) { |
361 | usb_free_urb(dev->adev.urb[j]); | 361 | usb_free_urb(dev->adev.urb[j]); |
362 | kfree(dev->adev.transfer_buffer[j]); | 362 | kfree(dev->adev.transfer_buffer[j]); |
@@ -439,13 +439,13 @@ static int snd_cx231xx_capture_open(struct snd_pcm_substream *substream) | |||
439 | dprintk("opening device and trying to acquire exclusive lock\n"); | 439 | dprintk("opening device and trying to acquire exclusive lock\n"); |
440 | 440 | ||
441 | if (!dev) { | 441 | if (!dev) { |
442 | cx231xx_errdev("BUG: cx231xx can't find device struct." | 442 | pr_err("BUG: cx231xx can't find device struct." |
443 | " Can't proceed with open\n"); | 443 | " Can't proceed with open\n"); |
444 | return -ENODEV; | 444 | return -ENODEV; |
445 | } | 445 | } |
446 | 446 | ||
447 | if (dev->state & DEV_DISCONNECTED) { | 447 | if (dev->state & DEV_DISCONNECTED) { |
448 | cx231xx_errdev("Can't open. the device was removed.\n"); | 448 | pr_err("Can't open. the device was removed.\n"); |
449 | return -ENODEV; | 449 | return -ENODEV; |
450 | } | 450 | } |
451 | 451 | ||
@@ -458,7 +458,7 @@ static int snd_cx231xx_capture_open(struct snd_pcm_substream *substream) | |||
458 | ret = cx231xx_set_alt_setting(dev, INDEX_AUDIO, 0); | 458 | ret = cx231xx_set_alt_setting(dev, INDEX_AUDIO, 0); |
459 | mutex_unlock(&dev->lock); | 459 | mutex_unlock(&dev->lock); |
460 | if (ret < 0) { | 460 | if (ret < 0) { |
461 | cx231xx_errdev("failed to set alternate setting !\n"); | 461 | pr_err("failed to set alternate setting !\n"); |
462 | 462 | ||
463 | return ret; | 463 | return ret; |
464 | } | 464 | } |
@@ -494,7 +494,7 @@ static int snd_cx231xx_pcm_close(struct snd_pcm_substream *substream) | |||
494 | /* 1 - 48000 samples per sec */ | 494 | /* 1 - 48000 samples per sec */ |
495 | ret = cx231xx_set_alt_setting(dev, INDEX_AUDIO, 0); | 495 | ret = cx231xx_set_alt_setting(dev, INDEX_AUDIO, 0); |
496 | if (ret < 0) { | 496 | if (ret < 0) { |
497 | cx231xx_errdev("failed to set alternate setting !\n"); | 497 | pr_err("failed to set alternate setting !\n"); |
498 | 498 | ||
499 | mutex_unlock(&dev->lock); | 499 | mutex_unlock(&dev->lock); |
500 | return ret; | 500 | return ret; |
@@ -662,7 +662,7 @@ static int cx231xx_audio_init(struct cx231xx *dev) | |||
662 | return 0; | 662 | return 0; |
663 | } | 663 | } |
664 | 664 | ||
665 | cx231xx_info("cx231xx-audio.c: probing for cx231xx " | 665 | pr_info("cx231xx-audio.c: probing for cx231xx " |
666 | "non standard usbaudio\n"); | 666 | "non standard usbaudio\n"); |
667 | 667 | ||
668 | err = snd_card_new(&dev->udev->dev, index[devnr], "Cx231xx Audio", | 668 | err = snd_card_new(&dev->udev->dev, index[devnr], "Cx231xx Audio", |
@@ -707,12 +707,12 @@ static int cx231xx_audio_init(struct cx231xx *dev) | |||
707 | bEndpointAddress; | 707 | bEndpointAddress; |
708 | 708 | ||
709 | adev->num_alt = uif->num_altsetting; | 709 | adev->num_alt = uif->num_altsetting; |
710 | cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n", | 710 | pr_info("EndPoint Addr 0x%x, Alternate settings: %i\n", |
711 | adev->end_point_addr, adev->num_alt); | 711 | adev->end_point_addr, adev->num_alt); |
712 | adev->alt_max_pkt_size = kmalloc(32 * adev->num_alt, GFP_KERNEL); | 712 | adev->alt_max_pkt_size = kmalloc(32 * adev->num_alt, GFP_KERNEL); |
713 | 713 | ||
714 | if (adev->alt_max_pkt_size == NULL) { | 714 | if (adev->alt_max_pkt_size == NULL) { |
715 | cx231xx_errdev("out of memory!\n"); | 715 | pr_err("out of memory!\n"); |
716 | return -ENOMEM; | 716 | return -ENOMEM; |
717 | } | 717 | } |
718 | 718 | ||
@@ -722,7 +722,7 @@ static int cx231xx_audio_init(struct cx231xx *dev) | |||
722 | wMaxPacketSize); | 722 | wMaxPacketSize); |
723 | adev->alt_max_pkt_size[i] = | 723 | adev->alt_max_pkt_size[i] = |
724 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); | 724 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); |
725 | cx231xx_info("Alternate setting %i, max size= %i\n", i, | 725 | pr_info("Alternate setting %i, max size= %i\n", i, |
726 | adev->alt_max_pkt_size[i]); | 726 | adev->alt_max_pkt_size[i]); |
727 | } | 727 | } |
728 | 728 | ||
diff --git a/drivers/media/usb/cx231xx/cx231xx-avcore.c b/drivers/media/usb/cx231xx/cx231xx-avcore.c index 781908b5a1a3..9185b05b4fbe 100644 --- a/drivers/media/usb/cx231xx/cx231xx-avcore.c +++ b/drivers/media/usb/cx231xx/cx231xx-avcore.c | |||
@@ -22,6 +22,7 @@ | |||
22 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "cx231xx.h" | ||
25 | #include <linux/init.h> | 26 | #include <linux/init.h> |
26 | #include <linux/list.h> | 27 | #include <linux/list.h> |
27 | #include <linux/module.h> | 28 | #include <linux/module.h> |
@@ -36,7 +37,6 @@ | |||
36 | #include <media/v4l2-common.h> | 37 | #include <media/v4l2-common.h> |
37 | #include <media/v4l2-ioctl.h> | 38 | #include <media/v4l2-ioctl.h> |
38 | 39 | ||
39 | #include "cx231xx.h" | ||
40 | #include "cx231xx-dif.h" | 40 | #include "cx231xx-dif.h" |
41 | 41 | ||
42 | #define TUNER_MODE_FM_RADIO 0 | 42 | #define TUNER_MODE_FM_RADIO 0 |
@@ -83,10 +83,10 @@ void initGPIO(struct cx231xx *dev) | |||
83 | cx231xx_send_gpio_cmd(dev, _gpio_direction, (u8 *)&value, 4, 0, 0); | 83 | cx231xx_send_gpio_cmd(dev, _gpio_direction, (u8 *)&value, 4, 0, 0); |
84 | 84 | ||
85 | verve_read_byte(dev, 0x07, &val); | 85 | verve_read_byte(dev, 0x07, &val); |
86 | cx231xx_info(" verve_read_byte address0x07=0x%x\n", val); | 86 | pr_info(" verve_read_byte address0x07=0x%x\n", val); |
87 | verve_write_byte(dev, 0x07, 0xF4); | 87 | verve_write_byte(dev, 0x07, 0xF4); |
88 | verve_read_byte(dev, 0x07, &val); | 88 | verve_read_byte(dev, 0x07, &val); |
89 | cx231xx_info(" verve_read_byte address0x07=0x%x\n", val); | 89 | pr_info(" verve_read_byte address0x07=0x%x\n", val); |
90 | 90 | ||
91 | cx231xx_capture_start(dev, 1, Vbi); | 91 | cx231xx_capture_start(dev, 1, Vbi); |
92 | 92 | ||
@@ -156,7 +156,7 @@ int cx231xx_afe_init_super_block(struct cx231xx *dev, u32 ref_count) | |||
156 | while (afe_power_status != 0x18) { | 156 | while (afe_power_status != 0x18) { |
157 | status = afe_write_byte(dev, SUP_BLK_PWRDN, 0x18); | 157 | status = afe_write_byte(dev, SUP_BLK_PWRDN, 0x18); |
158 | if (status < 0) { | 158 | if (status < 0) { |
159 | cx231xx_info( | 159 | pr_info( |
160 | ": Init Super Block failed in send cmd\n"); | 160 | ": Init Super Block failed in send cmd\n"); |
161 | break; | 161 | break; |
162 | } | 162 | } |
@@ -164,13 +164,13 @@ int cx231xx_afe_init_super_block(struct cx231xx *dev, u32 ref_count) | |||
164 | status = afe_read_byte(dev, SUP_BLK_PWRDN, &afe_power_status); | 164 | status = afe_read_byte(dev, SUP_BLK_PWRDN, &afe_power_status); |
165 | afe_power_status &= 0xff; | 165 | afe_power_status &= 0xff; |
166 | if (status < 0) { | 166 | if (status < 0) { |
167 | cx231xx_info( | 167 | pr_info( |
168 | ": Init Super Block failed in receive cmd\n"); | 168 | ": Init Super Block failed in receive cmd\n"); |
169 | break; | 169 | break; |
170 | } | 170 | } |
171 | i++; | 171 | i++; |
172 | if (i == 10) { | 172 | if (i == 10) { |
173 | cx231xx_info( | 173 | pr_info( |
174 | ": Init Super Block force break in loop !!!!\n"); | 174 | ": Init Super Block force break in loop !!!!\n"); |
175 | status = -1; | 175 | status = -1; |
176 | break; | 176 | break; |
@@ -410,7 +410,7 @@ int cx231xx_afe_update_power_control(struct cx231xx *dev, | |||
410 | status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3, | 410 | status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3, |
411 | 0x00); | 411 | 0x00); |
412 | } else { | 412 | } else { |
413 | cx231xx_info("Invalid AV mode input\n"); | 413 | pr_info("Invalid AV mode input\n"); |
414 | status = -1; | 414 | status = -1; |
415 | } | 415 | } |
416 | break; | 416 | break; |
@@ -467,7 +467,7 @@ int cx231xx_afe_update_power_control(struct cx231xx *dev, | |||
467 | status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3, | 467 | status |= afe_write_byte(dev, ADC_PWRDN_CLAMP_CH3, |
468 | 0x40); | 468 | 0x40); |
469 | } else { | 469 | } else { |
470 | cx231xx_info("Invalid AV mode input\n"); | 470 | pr_info("Invalid AV mode input\n"); |
471 | status = -1; | 471 | status = -1; |
472 | } | 472 | } |
473 | } /* switch */ | 473 | } /* switch */ |
@@ -573,7 +573,7 @@ int cx231xx_set_video_input_mux(struct cx231xx *dev, u8 input) | |||
573 | status = cx231xx_set_power_mode(dev, | 573 | status = cx231xx_set_power_mode(dev, |
574 | POLARIS_AVMODE_ENXTERNAL_AV); | 574 | POLARIS_AVMODE_ENXTERNAL_AV); |
575 | if (status < 0) { | 575 | if (status < 0) { |
576 | cx231xx_errdev("%s: set_power_mode : Failed to" | 576 | pr_err("%s: set_power_mode : Failed to" |
577 | " set Power - errCode [%d]!\n", | 577 | " set Power - errCode [%d]!\n", |
578 | __func__, status); | 578 | __func__, status); |
579 | return status; | 579 | return status; |
@@ -591,7 +591,7 @@ int cx231xx_set_video_input_mux(struct cx231xx *dev, u8 input) | |||
591 | status = cx231xx_set_power_mode(dev, | 591 | status = cx231xx_set_power_mode(dev, |
592 | POLARIS_AVMODE_ANALOGT_TV); | 592 | POLARIS_AVMODE_ANALOGT_TV); |
593 | if (status < 0) { | 593 | if (status < 0) { |
594 | cx231xx_errdev("%s: set_power_mode:Failed" | 594 | pr_err("%s: set_power_mode:Failed" |
595 | " to set Power - errCode [%d]!\n", | 595 | " to set Power - errCode [%d]!\n", |
596 | __func__, status); | 596 | __func__, status); |
597 | return status; | 597 | return status; |
@@ -608,7 +608,7 @@ int cx231xx_set_video_input_mux(struct cx231xx *dev, u8 input) | |||
608 | 608 | ||
609 | break; | 609 | break; |
610 | default: | 610 | default: |
611 | cx231xx_errdev("%s: set_power_mode : Unknown Input %d !\n", | 611 | pr_err("%s: set_power_mode : Unknown Input %d !\n", |
612 | __func__, INPUT(input)->type); | 612 | __func__, INPUT(input)->type); |
613 | break; | 613 | break; |
614 | } | 614 | } |
@@ -628,7 +628,7 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev, | |||
628 | if (pin_type != dev->video_input) { | 628 | if (pin_type != dev->video_input) { |
629 | status = cx231xx_afe_adjust_ref_count(dev, pin_type); | 629 | status = cx231xx_afe_adjust_ref_count(dev, pin_type); |
630 | if (status < 0) { | 630 | if (status < 0) { |
631 | cx231xx_errdev("%s: adjust_ref_count :Failed to set" | 631 | pr_err("%s: adjust_ref_count :Failed to set" |
632 | "AFE input mux - errCode [%d]!\n", | 632 | "AFE input mux - errCode [%d]!\n", |
633 | __func__, status); | 633 | __func__, status); |
634 | return status; | 634 | return status; |
@@ -638,7 +638,7 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev, | |||
638 | /* call afe block to set video inputs */ | 638 | /* call afe block to set video inputs */ |
639 | status = cx231xx_afe_set_input_mux(dev, input); | 639 | status = cx231xx_afe_set_input_mux(dev, input); |
640 | if (status < 0) { | 640 | if (status < 0) { |
641 | cx231xx_errdev("%s: set_input_mux :Failed to set" | 641 | pr_err("%s: set_input_mux :Failed to set" |
642 | " AFE input mux - errCode [%d]!\n", | 642 | " AFE input mux - errCode [%d]!\n", |
643 | __func__, status); | 643 | __func__, status); |
644 | return status; | 644 | return status; |
@@ -670,7 +670,7 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev, | |||
670 | /* Tell DIF object to go to baseband mode */ | 670 | /* Tell DIF object to go to baseband mode */ |
671 | status = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND); | 671 | status = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND); |
672 | if (status < 0) { | 672 | if (status < 0) { |
673 | cx231xx_errdev("%s: cx231xx_dif set to By pass" | 673 | pr_err("%s: cx231xx_dif set to By pass" |
674 | " mode- errCode [%d]!\n", | 674 | " mode- errCode [%d]!\n", |
675 | __func__, status); | 675 | __func__, status); |
676 | return status; | 676 | return status; |
@@ -715,7 +715,7 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev, | |||
715 | /* Tell DIF object to go to baseband mode */ | 715 | /* Tell DIF object to go to baseband mode */ |
716 | status = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND); | 716 | status = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND); |
717 | if (status < 0) { | 717 | if (status < 0) { |
718 | cx231xx_errdev("%s: cx231xx_dif set to By pass" | 718 | pr_err("%s: cx231xx_dif set to By pass" |
719 | " mode- errCode [%d]!\n", | 719 | " mode- errCode [%d]!\n", |
720 | __func__, status); | 720 | __func__, status); |
721 | return status; | 721 | return status; |
@@ -790,7 +790,7 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev, | |||
790 | status = cx231xx_dif_set_standard(dev, | 790 | status = cx231xx_dif_set_standard(dev, |
791 | DIF_USE_BASEBAND); | 791 | DIF_USE_BASEBAND); |
792 | if (status < 0) { | 792 | if (status < 0) { |
793 | cx231xx_errdev("%s: cx231xx_dif set to By pass" | 793 | pr_err("%s: cx231xx_dif set to By pass" |
794 | " mode- errCode [%d]!\n", | 794 | " mode- errCode [%d]!\n", |
795 | __func__, status); | 795 | __func__, status); |
796 | return status; | 796 | return status; |
@@ -826,7 +826,7 @@ int cx231xx_set_decoder_video_input(struct cx231xx *dev, | |||
826 | /* Reinitialize the DIF */ | 826 | /* Reinitialize the DIF */ |
827 | status = cx231xx_dif_set_standard(dev, dev->norm); | 827 | status = cx231xx_dif_set_standard(dev, dev->norm); |
828 | if (status < 0) { | 828 | if (status < 0) { |
829 | cx231xx_errdev("%s: cx231xx_dif set to By pass" | 829 | pr_err("%s: cx231xx_dif set to By pass" |
830 | " mode- errCode [%d]!\n", | 830 | " mode- errCode [%d]!\n", |
831 | __func__, status); | 831 | __func__, status); |
832 | return status; | 832 | return status; |
@@ -970,14 +970,14 @@ int cx231xx_do_mode_ctrl_overrides(struct cx231xx *dev) | |||
970 | { | 970 | { |
971 | int status = 0; | 971 | int status = 0; |
972 | 972 | ||
973 | cx231xx_info("do_mode_ctrl_overrides : 0x%x\n", | 973 | pr_info("do_mode_ctrl_overrides : 0x%x\n", |
974 | (unsigned int)dev->norm); | 974 | (unsigned int)dev->norm); |
975 | 975 | ||
976 | /* Change the DFE_CTRL3 bp_percent to fix flagging */ | 976 | /* Change the DFE_CTRL3 bp_percent to fix flagging */ |
977 | status = vid_blk_write_word(dev, DFE_CTRL3, 0xCD3F0280); | 977 | status = vid_blk_write_word(dev, DFE_CTRL3, 0xCD3F0280); |
978 | 978 | ||
979 | if (dev->norm & (V4L2_STD_NTSC | V4L2_STD_PAL_M)) { | 979 | if (dev->norm & (V4L2_STD_NTSC | V4L2_STD_PAL_M)) { |
980 | cx231xx_info("do_mode_ctrl_overrides NTSC\n"); | 980 | pr_info("do_mode_ctrl_overrides NTSC\n"); |
981 | 981 | ||
982 | /* Move the close caption lines out of active video, | 982 | /* Move the close caption lines out of active video, |
983 | adjust the active video start point */ | 983 | adjust the active video start point */ |
@@ -1004,7 +1004,7 @@ int cx231xx_do_mode_ctrl_overrides(struct cx231xx *dev) | |||
1004 | (FLD_HBLANK_CNT, 0x79)); | 1004 | (FLD_HBLANK_CNT, 0x79)); |
1005 | 1005 | ||
1006 | } else if (dev->norm & V4L2_STD_SECAM) { | 1006 | } else if (dev->norm & V4L2_STD_SECAM) { |
1007 | cx231xx_info("do_mode_ctrl_overrides SECAM\n"); | 1007 | pr_info("do_mode_ctrl_overrides SECAM\n"); |
1008 | status = cx231xx_read_modify_write_i2c_dword(dev, | 1008 | status = cx231xx_read_modify_write_i2c_dword(dev, |
1009 | VID_BLK_I2C_ADDRESS, | 1009 | VID_BLK_I2C_ADDRESS, |
1010 | VERT_TIM_CTRL, | 1010 | VERT_TIM_CTRL, |
@@ -1031,7 +1031,7 @@ int cx231xx_do_mode_ctrl_overrides(struct cx231xx *dev) | |||
1031 | cx231xx_set_field | 1031 | cx231xx_set_field |
1032 | (FLD_HBLANK_CNT, 0x85)); | 1032 | (FLD_HBLANK_CNT, 0x85)); |
1033 | } else { | 1033 | } else { |
1034 | cx231xx_info("do_mode_ctrl_overrides PAL\n"); | 1034 | pr_info("do_mode_ctrl_overrides PAL\n"); |
1035 | status = cx231xx_read_modify_write_i2c_dword(dev, | 1035 | status = cx231xx_read_modify_write_i2c_dword(dev, |
1036 | VID_BLK_I2C_ADDRESS, | 1036 | VID_BLK_I2C_ADDRESS, |
1037 | VERT_TIM_CTRL, | 1037 | VERT_TIM_CTRL, |
@@ -1331,109 +1331,109 @@ void cx231xx_dump_HH_reg(struct cx231xx *dev) | |||
1331 | 1331 | ||
1332 | for (i = 0x100; i < 0x140; i++) { | 1332 | for (i = 0x100; i < 0x140; i++) { |
1333 | vid_blk_read_word(dev, i, &value); | 1333 | vid_blk_read_word(dev, i, &value); |
1334 | cx231xx_info("reg0x%x=0x%x\n", i, value); | 1334 | pr_info("reg0x%x=0x%x\n", i, value); |
1335 | i = i+3; | 1335 | i = i+3; |
1336 | } | 1336 | } |
1337 | 1337 | ||
1338 | for (i = 0x300; i < 0x400; i++) { | 1338 | for (i = 0x300; i < 0x400; i++) { |
1339 | vid_blk_read_word(dev, i, &value); | 1339 | vid_blk_read_word(dev, i, &value); |
1340 | cx231xx_info("reg0x%x=0x%x\n", i, value); | 1340 | pr_info("reg0x%x=0x%x\n", i, value); |
1341 | i = i+3; | 1341 | i = i+3; |
1342 | } | 1342 | } |
1343 | 1343 | ||
1344 | for (i = 0x400; i < 0x440; i++) { | 1344 | for (i = 0x400; i < 0x440; i++) { |
1345 | vid_blk_read_word(dev, i, &value); | 1345 | vid_blk_read_word(dev, i, &value); |
1346 | cx231xx_info("reg0x%x=0x%x\n", i, value); | 1346 | pr_info("reg0x%x=0x%x\n", i, value); |
1347 | i = i+3; | 1347 | i = i+3; |
1348 | } | 1348 | } |
1349 | 1349 | ||
1350 | vid_blk_read_word(dev, AFE_CTRL_C2HH_SRC_CTRL, &value); | 1350 | vid_blk_read_word(dev, AFE_CTRL_C2HH_SRC_CTRL, &value); |
1351 | cx231xx_info("AFE_CTRL_C2HH_SRC_CTRL=0x%x\n", value); | 1351 | pr_info("AFE_CTRL_C2HH_SRC_CTRL=0x%x\n", value); |
1352 | vid_blk_write_word(dev, AFE_CTRL_C2HH_SRC_CTRL, 0x4485D390); | 1352 | vid_blk_write_word(dev, AFE_CTRL_C2HH_SRC_CTRL, 0x4485D390); |
1353 | vid_blk_read_word(dev, AFE_CTRL_C2HH_SRC_CTRL, &value); | 1353 | vid_blk_read_word(dev, AFE_CTRL_C2HH_SRC_CTRL, &value); |
1354 | cx231xx_info("AFE_CTRL_C2HH_SRC_CTRL=0x%x\n", value); | 1354 | pr_info("AFE_CTRL_C2HH_SRC_CTRL=0x%x\n", value); |
1355 | } | 1355 | } |
1356 | 1356 | ||
1357 | void cx231xx_dump_SC_reg(struct cx231xx *dev) | 1357 | void cx231xx_dump_SC_reg(struct cx231xx *dev) |
1358 | { | 1358 | { |
1359 | u8 value[4] = { 0, 0, 0, 0 }; | 1359 | u8 value[4] = { 0, 0, 0, 0 }; |
1360 | cx231xx_info("cx231xx_dump_SC_reg!\n"); | 1360 | pr_info("cx231xx_dump_SC_reg!\n"); |
1361 | 1361 | ||
1362 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, BOARD_CFG_STAT, | 1362 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, BOARD_CFG_STAT, |
1363 | value, 4); | 1363 | value, 4); |
1364 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", BOARD_CFG_STAT, value[0], | 1364 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", BOARD_CFG_STAT, value[0], |
1365 | value[1], value[2], value[3]); | 1365 | value[1], value[2], value[3]); |
1366 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS_MODE_REG, | 1366 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS_MODE_REG, |
1367 | value, 4); | 1367 | value, 4); |
1368 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS_MODE_REG, value[0], | 1368 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS_MODE_REG, value[0], |
1369 | value[1], value[2], value[3]); | 1369 | value[1], value[2], value[3]); |
1370 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS1_CFG_REG, | 1370 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS1_CFG_REG, |
1371 | value, 4); | 1371 | value, 4); |
1372 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS1_CFG_REG, value[0], | 1372 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS1_CFG_REG, value[0], |
1373 | value[1], value[2], value[3]); | 1373 | value[1], value[2], value[3]); |
1374 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS1_LENGTH_REG, | 1374 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS1_LENGTH_REG, |
1375 | value, 4); | 1375 | value, 4); |
1376 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS1_LENGTH_REG, value[0], | 1376 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS1_LENGTH_REG, value[0], |
1377 | value[1], value[2], value[3]); | 1377 | value[1], value[2], value[3]); |
1378 | 1378 | ||
1379 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS2_CFG_REG, | 1379 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS2_CFG_REG, |
1380 | value, 4); | 1380 | value, 4); |
1381 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS2_CFG_REG, value[0], | 1381 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS2_CFG_REG, value[0], |
1382 | value[1], value[2], value[3]); | 1382 | value[1], value[2], value[3]); |
1383 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS2_LENGTH_REG, | 1383 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, TS2_LENGTH_REG, |
1384 | value, 4); | 1384 | value, 4); |
1385 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS2_LENGTH_REG, value[0], | 1385 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", TS2_LENGTH_REG, value[0], |
1386 | value[1], value[2], value[3]); | 1386 | value[1], value[2], value[3]); |
1387 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, | 1387 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, |
1388 | value, 4); | 1388 | value, 4); |
1389 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", EP_MODE_SET, value[0], | 1389 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", EP_MODE_SET, value[0], |
1390 | value[1], value[2], value[3]); | 1390 | value[1], value[2], value[3]); |
1391 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_PTN1, | 1391 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_PTN1, |
1392 | value, 4); | 1392 | value, 4); |
1393 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_PTN1, value[0], | 1393 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_PTN1, value[0], |
1394 | value[1], value[2], value[3]); | 1394 | value[1], value[2], value[3]); |
1395 | 1395 | ||
1396 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_PTN2, | 1396 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_PTN2, |
1397 | value, 4); | 1397 | value, 4); |
1398 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_PTN2, value[0], | 1398 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_PTN2, value[0], |
1399 | value[1], value[2], value[3]); | 1399 | value[1], value[2], value[3]); |
1400 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_PTN3, | 1400 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_PTN3, |
1401 | value, 4); | 1401 | value, 4); |
1402 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_PTN3, value[0], | 1402 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_PTN3, value[0], |
1403 | value[1], value[2], value[3]); | 1403 | value[1], value[2], value[3]); |
1404 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_MASK0, | 1404 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_MASK0, |
1405 | value, 4); | 1405 | value, 4); |
1406 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_MASK0, value[0], | 1406 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_MASK0, value[0], |
1407 | value[1], value[2], value[3]); | 1407 | value[1], value[2], value[3]); |
1408 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_MASK1, | 1408 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_MASK1, |
1409 | value, 4); | 1409 | value, 4); |
1410 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_MASK1, value[0], | 1410 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_MASK1, value[0], |
1411 | value[1], value[2], value[3]); | 1411 | value[1], value[2], value[3]); |
1412 | 1412 | ||
1413 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_MASK2, | 1413 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_PWR_MASK2, |
1414 | value, 4); | 1414 | value, 4); |
1415 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_MASK2, value[0], | 1415 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_PWR_MASK2, value[0], |
1416 | value[1], value[2], value[3]); | 1416 | value[1], value[2], value[3]); |
1417 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_GAIN, | 1417 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_GAIN, |
1418 | value, 4); | 1418 | value, 4); |
1419 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_GAIN, value[0], | 1419 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_GAIN, value[0], |
1420 | value[1], value[2], value[3]); | 1420 | value[1], value[2], value[3]); |
1421 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_CAR_REG, | 1421 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_CAR_REG, |
1422 | value, 4); | 1422 | value, 4); |
1423 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_CAR_REG, value[0], | 1423 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_CAR_REG, value[0], |
1424 | value[1], value[2], value[3]); | 1424 | value[1], value[2], value[3]); |
1425 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_OT_CFG1, | 1425 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_OT_CFG1, |
1426 | value, 4); | 1426 | value, 4); |
1427 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_OT_CFG1, value[0], | 1427 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_OT_CFG1, value[0], |
1428 | value[1], value[2], value[3]); | 1428 | value[1], value[2], value[3]); |
1429 | 1429 | ||
1430 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_OT_CFG2, | 1430 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, CIR_OT_CFG2, |
1431 | value, 4); | 1431 | value, 4); |
1432 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_OT_CFG2, value[0], | 1432 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", CIR_OT_CFG2, value[0], |
1433 | value[1], value[2], value[3]); | 1433 | value[1], value[2], value[3]); |
1434 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, PWR_CTL_EN, | 1434 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, PWR_CTL_EN, |
1435 | value, 4); | 1435 | value, 4); |
1436 | cx231xx_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", PWR_CTL_EN, value[0], | 1436 | pr_info("reg0x%x=0x%x 0x%x 0x%x 0x%x\n", PWR_CTL_EN, value[0], |
1437 | value[1], value[2], value[3]); | 1437 | value[1], value[2], value[3]); |
1438 | 1438 | ||
1439 | 1439 | ||
@@ -1503,7 +1503,7 @@ void cx231xx_set_Colibri_For_LowIF(struct cx231xx *dev, u32 if_freq, | |||
1503 | u32 standard = 0; | 1503 | u32 standard = 0; |
1504 | u8 value[4] = { 0, 0, 0, 0 }; | 1504 | u8 value[4] = { 0, 0, 0, 0 }; |
1505 | 1505 | ||
1506 | cx231xx_info("Enter cx231xx_set_Colibri_For_LowIF()\n"); | 1506 | pr_info("Enter cx231xx_set_Colibri_For_LowIF()\n"); |
1507 | value[0] = (u8) 0x6F; | 1507 | value[0] = (u8) 0x6F; |
1508 | value[1] = (u8) 0x6F; | 1508 | value[1] = (u8) 0x6F; |
1509 | value[2] = (u8) 0x6F; | 1509 | value[2] = (u8) 0x6F; |
@@ -1523,7 +1523,7 @@ void cx231xx_set_Colibri_For_LowIF(struct cx231xx *dev, u32 if_freq, | |||
1523 | colibri_carrier_offset = cx231xx_Get_Colibri_CarrierOffset(mode, | 1523 | colibri_carrier_offset = cx231xx_Get_Colibri_CarrierOffset(mode, |
1524 | standard); | 1524 | standard); |
1525 | 1525 | ||
1526 | cx231xx_info("colibri_carrier_offset=%d, standard=0x%x\n", | 1526 | pr_info("colibri_carrier_offset=%d, standard=0x%x\n", |
1527 | colibri_carrier_offset, standard); | 1527 | colibri_carrier_offset, standard); |
1528 | 1528 | ||
1529 | /* Set the band Pass filter for DIF*/ | 1529 | /* Set the band Pass filter for DIF*/ |
@@ -1557,7 +1557,7 @@ void cx231xx_set_DIF_bandpass(struct cx231xx *dev, u32 if_freq, | |||
1557 | u64 pll_freq_u64 = 0; | 1557 | u64 pll_freq_u64 = 0; |
1558 | u32 i = 0; | 1558 | u32 i = 0; |
1559 | 1559 | ||
1560 | cx231xx_info("if_freq=%d;spectral_invert=0x%x;mode=0x%x\n", | 1560 | pr_info("if_freq=%d;spectral_invert=0x%x;mode=0x%x\n", |
1561 | if_freq, spectral_invert, mode); | 1561 | if_freq, spectral_invert, mode); |
1562 | 1562 | ||
1563 | 1563 | ||
@@ -1601,7 +1601,7 @@ void cx231xx_set_DIF_bandpass(struct cx231xx *dev, u32 if_freq, | |||
1601 | if_freq = 16000000; | 1601 | if_freq = 16000000; |
1602 | } | 1602 | } |
1603 | 1603 | ||
1604 | cx231xx_info("Enter IF=%zu\n", | 1604 | pr_info("Enter IF=%zu\n", |
1605 | ARRAY_SIZE(Dif_set_array)); | 1605 | ARRAY_SIZE(Dif_set_array)); |
1606 | for (i = 0; i < ARRAY_SIZE(Dif_set_array); i++) { | 1606 | for (i = 0; i < ARRAY_SIZE(Dif_set_array); i++) { |
1607 | if (Dif_set_array[i].if_freq == if_freq) { | 1607 | if (Dif_set_array[i].if_freq == if_freq) { |
@@ -1714,7 +1714,7 @@ int cx231xx_dif_set_standard(struct cx231xx *dev, u32 standard) | |||
1714 | u32 dif_misc_ctrl_value = 0; | 1714 | u32 dif_misc_ctrl_value = 0; |
1715 | u32 func_mode = 0; | 1715 | u32 func_mode = 0; |
1716 | 1716 | ||
1717 | cx231xx_info("%s: setStandard to %x\n", __func__, standard); | 1717 | pr_info("%s: setStandard to %x\n", __func__, standard); |
1718 | 1718 | ||
1719 | status = vid_blk_read_word(dev, DIF_MISC_CTRL, &dif_misc_ctrl_value); | 1719 | status = vid_blk_read_word(dev, DIF_MISC_CTRL, &dif_misc_ctrl_value); |
1720 | if (standard != DIF_USE_BASEBAND) | 1720 | if (standard != DIF_USE_BASEBAND) |
@@ -2117,7 +2117,7 @@ int cx231xx_tuner_post_channel_change(struct cx231xx *dev) | |||
2117 | { | 2117 | { |
2118 | int status = 0; | 2118 | int status = 0; |
2119 | u32 dwval; | 2119 | u32 dwval; |
2120 | cx231xx_info("cx231xx_tuner_post_channel_change dev->tuner_type =0%d\n", | 2120 | pr_info("cx231xx_tuner_post_channel_change dev->tuner_type =0%d\n", |
2121 | dev->tuner_type); | 2121 | dev->tuner_type); |
2122 | /* Set the RF and IF k_agc values to 4 for PAL/NTSC and 8 for | 2122 | /* Set the RF and IF k_agc values to 4 for PAL/NTSC and 8 for |
2123 | * SECAM L/B/D standards */ | 2123 | * SECAM L/B/D standards */ |
@@ -2219,7 +2219,7 @@ int cx231xx_set_power_mode(struct cx231xx *dev, enum AV_MODE mode) | |||
2219 | if (dev->power_mode != mode) | 2219 | if (dev->power_mode != mode) |
2220 | dev->power_mode = mode; | 2220 | dev->power_mode = mode; |
2221 | else { | 2221 | else { |
2222 | cx231xx_info(" setPowerMode::mode = %d, No Change req.\n", | 2222 | pr_info(" setPowerMode::mode = %d, No Change req.\n", |
2223 | mode); | 2223 | mode); |
2224 | return 0; | 2224 | return 0; |
2225 | } | 2225 | } |
@@ -2459,7 +2459,7 @@ int cx231xx_start_stream(struct cx231xx *dev, u32 ep_mask) | |||
2459 | u32 tmp = 0; | 2459 | u32 tmp = 0; |
2460 | int status = 0; | 2460 | int status = 0; |
2461 | 2461 | ||
2462 | cx231xx_info("cx231xx_start_stream():: ep_mask = %x\n", ep_mask); | 2462 | pr_info("cx231xx_start_stream():: ep_mask = %x\n", ep_mask); |
2463 | status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, | 2463 | status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, |
2464 | value, 4); | 2464 | value, 4); |
2465 | if (status < 0) | 2465 | if (status < 0) |
@@ -2484,7 +2484,7 @@ int cx231xx_stop_stream(struct cx231xx *dev, u32 ep_mask) | |||
2484 | u32 tmp = 0; | 2484 | u32 tmp = 0; |
2485 | int status = 0; | 2485 | int status = 0; |
2486 | 2486 | ||
2487 | cx231xx_info("cx231xx_stop_stream():: ep_mask = %x\n", ep_mask); | 2487 | pr_info("cx231xx_stop_stream():: ep_mask = %x\n", ep_mask); |
2488 | status = | 2488 | status = |
2489 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, value, 4); | 2489 | cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, EP_MODE_SET, value, 4); |
2490 | if (status < 0) | 2490 | if (status < 0) |
@@ -2512,32 +2512,32 @@ int cx231xx_initialize_stream_xfer(struct cx231xx *dev, u32 media_type) | |||
2512 | if (dev->udev->speed == USB_SPEED_HIGH) { | 2512 | if (dev->udev->speed == USB_SPEED_HIGH) { |
2513 | switch (media_type) { | 2513 | switch (media_type) { |
2514 | case Audio: | 2514 | case Audio: |
2515 | cx231xx_info("%s: Audio enter HANC\n", __func__); | 2515 | pr_info("%s: Audio enter HANC\n", __func__); |
2516 | status = | 2516 | status = |
2517 | cx231xx_mode_register(dev, TS_MODE_REG, 0x9300); | 2517 | cx231xx_mode_register(dev, TS_MODE_REG, 0x9300); |
2518 | break; | 2518 | break; |
2519 | 2519 | ||
2520 | case Vbi: | 2520 | case Vbi: |
2521 | cx231xx_info("%s: set vanc registers\n", __func__); | 2521 | pr_info("%s: set vanc registers\n", __func__); |
2522 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x300); | 2522 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x300); |
2523 | break; | 2523 | break; |
2524 | 2524 | ||
2525 | case Sliced_cc: | 2525 | case Sliced_cc: |
2526 | cx231xx_info("%s: set hanc registers\n", __func__); | 2526 | pr_info("%s: set hanc registers\n", __func__); |
2527 | status = | 2527 | status = |
2528 | cx231xx_mode_register(dev, TS_MODE_REG, 0x1300); | 2528 | cx231xx_mode_register(dev, TS_MODE_REG, 0x1300); |
2529 | break; | 2529 | break; |
2530 | 2530 | ||
2531 | case Raw_Video: | 2531 | case Raw_Video: |
2532 | cx231xx_info("%s: set video registers\n", __func__); | 2532 | pr_info("%s: set video registers\n", __func__); |
2533 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100); | 2533 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100); |
2534 | break; | 2534 | break; |
2535 | 2535 | ||
2536 | case TS1_serial_mode: | 2536 | case TS1_serial_mode: |
2537 | cx231xx_info("%s: set ts1 registers", __func__); | 2537 | pr_info("%s: set ts1 registers", __func__); |
2538 | 2538 | ||
2539 | if (dev->board.has_417) { | 2539 | if (dev->board.has_417) { |
2540 | cx231xx_info(" MPEG\n"); | 2540 | pr_info(" MPEG\n"); |
2541 | value &= 0xFFFFFFFC; | 2541 | value &= 0xFFFFFFFC; |
2542 | value |= 0x3; | 2542 | value |= 0x3; |
2543 | 2543 | ||
@@ -2558,14 +2558,14 @@ int cx231xx_initialize_stream_xfer(struct cx231xx *dev, u32 media_type) | |||
2558 | TS1_LENGTH_REG, val, 4); | 2558 | TS1_LENGTH_REG, val, 4); |
2559 | 2559 | ||
2560 | } else { | 2560 | } else { |
2561 | cx231xx_info(" BDA\n"); | 2561 | pr_info(" BDA\n"); |
2562 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x101); | 2562 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x101); |
2563 | status = cx231xx_mode_register(dev, TS1_CFG_REG, 0x010); | 2563 | status = cx231xx_mode_register(dev, TS1_CFG_REG, 0x010); |
2564 | } | 2564 | } |
2565 | break; | 2565 | break; |
2566 | 2566 | ||
2567 | case TS1_parallel_mode: | 2567 | case TS1_parallel_mode: |
2568 | cx231xx_info("%s: set ts1 parallel mode registers\n", | 2568 | pr_info("%s: set ts1 parallel mode registers\n", |
2569 | __func__); | 2569 | __func__); |
2570 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100); | 2570 | status = cx231xx_mode_register(dev, TS_MODE_REG, 0x100); |
2571 | status = cx231xx_mode_register(dev, TS1_CFG_REG, 0x400); | 2571 | status = cx231xx_mode_register(dev, TS1_CFG_REG, 0x400); |
@@ -2919,7 +2919,7 @@ int cx231xx_gpio_i2c_read_ack(struct cx231xx *dev) | |||
2919 | (nCnt > 0)); | 2919 | (nCnt > 0)); |
2920 | 2920 | ||
2921 | if (nCnt == 0) | 2921 | if (nCnt == 0) |
2922 | cx231xx_info("No ACK after %d msec -GPIO I2C failed!", | 2922 | pr_info("No ACK after %d msec -GPIO I2C failed!", |
2923 | nInit * 10); | 2923 | nInit * 10); |
2924 | 2924 | ||
2925 | /* | 2925 | /* |
diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c index 432cbcf8ce43..375fd85447f8 100644 --- a/drivers/media/usb/cx231xx/cx231xx-cards.c +++ b/drivers/media/usb/cx231xx/cx231xx-cards.c | |||
@@ -20,6 +20,7 @@ | |||
20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include "cx231xx.h" | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
25 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
@@ -35,7 +36,6 @@ | |||
35 | #include "xc5000.h" | 36 | #include "xc5000.h" |
36 | #include "tda18271.h" | 37 | #include "tda18271.h" |
37 | 38 | ||
38 | #include "cx231xx.h" | ||
39 | 39 | ||
40 | static int tuner = -1; | 40 | static int tuner = -1; |
41 | module_param(tuner, int, 0444); | 41 | module_param(tuner, int, 0444); |
@@ -673,7 +673,7 @@ struct cx231xx_board cx231xx_boards[] = { | |||
673 | .decoder = CX231XX_AVDECODER, | 673 | .decoder = CX231XX_AVDECODER, |
674 | .output_mode = OUT_MODE_VIP11, | 674 | .output_mode = OUT_MODE_VIP11, |
675 | .ctl_pin_status_mask = 0xFFFFFFC4, | 675 | .ctl_pin_status_mask = 0xFFFFFFC4, |
676 | .agc_analog_digital_select_gpio = 0x0c, | 676 | .agc_analog_digital_select_gpio = 0x0c, |
677 | /* According with PV CxPlrCAP.inf file */ | 677 | /* According with PV CxPlrCAP.inf file */ |
678 | .gpio_pin_status_mask = 0x4001000, | 678 | .gpio_pin_status_mask = 0x4001000, |
679 | .norm = V4L2_STD_NTSC, | 679 | .norm = V4L2_STD_NTSC, |
@@ -856,7 +856,7 @@ int cx231xx_tuner_callback(void *ptr, int component, int command, int arg) | |||
856 | 856 | ||
857 | if (dev->tuner_type == TUNER_XC5000) { | 857 | if (dev->tuner_type == TUNER_XC5000) { |
858 | if (command == XC5000_TUNER_RESET) { | 858 | if (command == XC5000_TUNER_RESET) { |
859 | cx231xx_info | 859 | pr_info |
860 | ("Tuner CB: RESET: cmd %d : tuner type %d \n", | 860 | ("Tuner CB: RESET: cmd %d : tuner type %d \n", |
861 | command, dev->tuner_type); | 861 | command, dev->tuner_type); |
862 | cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, | 862 | cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, |
@@ -916,7 +916,7 @@ void cx231xx_pre_card_setup(struct cx231xx *dev) | |||
916 | 916 | ||
917 | cx231xx_set_model(dev); | 917 | cx231xx_set_model(dev); |
918 | 918 | ||
919 | cx231xx_info("Identified as %s (card=%d)\n", | 919 | pr_info("Identified as %s (card=%d)\n", |
920 | dev->board.name, dev->model); | 920 | dev->board.name, dev->model); |
921 | 921 | ||
922 | /* set the direction for GPIO pins */ | 922 | /* set the direction for GPIO pins */ |
@@ -990,7 +990,7 @@ static int read_eeprom(struct cx231xx *dev, struct i2c_client *client, | |||
990 | /* start reading at offset 0 */ | 990 | /* start reading at offset 0 */ |
991 | ret = i2c_transfer(client->adapter, &msg_write, 1); | 991 | ret = i2c_transfer(client->adapter, &msg_write, 1); |
992 | if (ret < 0) { | 992 | if (ret < 0) { |
993 | cx231xx_err("Can't read eeprom\n"); | 993 | pr_err("Can't read eeprom\n"); |
994 | return ret; | 994 | return ret; |
995 | } | 995 | } |
996 | 996 | ||
@@ -1000,7 +1000,7 @@ static int read_eeprom(struct cx231xx *dev, struct i2c_client *client, | |||
1000 | 1000 | ||
1001 | ret = i2c_transfer(client->adapter, &msg_read, 1); | 1001 | ret = i2c_transfer(client->adapter, &msg_read, 1); |
1002 | if (ret < 0) { | 1002 | if (ret < 0) { |
1003 | cx231xx_err("Can't read eeprom\n"); | 1003 | pr_err("Can't read eeprom\n"); |
1004 | return ret; | 1004 | return ret; |
1005 | } | 1005 | } |
1006 | eedata_cur += msg_read.len; | 1006 | eedata_cur += msg_read.len; |
@@ -1008,7 +1008,7 @@ static int read_eeprom(struct cx231xx *dev, struct i2c_client *client, | |||
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | for (i = 0; i + 15 < len; i += 16) | 1010 | for (i = 0; i + 15 < len; i += 16) |
1011 | cx231xx_info("i2c eeprom %02x: %*ph\n", i, 16, &eedata[i]); | 1011 | pr_info("i2c eeprom %02x: %*ph\n", i, 16, &eedata[i]); |
1012 | 1012 | ||
1013 | return 0; | 1013 | return 0; |
1014 | } | 1014 | } |
@@ -1028,7 +1028,7 @@ void cx231xx_card_setup(struct cx231xx *dev) | |||
1028 | cx231xx_get_i2c_adap(dev, I2C_0), | 1028 | cx231xx_get_i2c_adap(dev, I2C_0), |
1029 | "cx25840", 0x88 >> 1, NULL); | 1029 | "cx25840", 0x88 >> 1, NULL); |
1030 | if (dev->sd_cx25840 == NULL) | 1030 | if (dev->sd_cx25840 == NULL) |
1031 | cx231xx_info("cx25840 subdev registration failure\n"); | 1031 | pr_info("cx25840 subdev registration failure\n"); |
1032 | cx25840_call(dev, core, load_fw); | 1032 | cx25840_call(dev, core, load_fw); |
1033 | 1033 | ||
1034 | } | 1034 | } |
@@ -1042,7 +1042,7 @@ void cx231xx_card_setup(struct cx231xx *dev) | |||
1042 | "tuner", | 1042 | "tuner", |
1043 | dev->tuner_addr, NULL); | 1043 | dev->tuner_addr, NULL); |
1044 | if (dev->sd_tuner == NULL) | 1044 | if (dev->sd_tuner == NULL) |
1045 | cx231xx_info("tuner subdev registration failure\n"); | 1045 | pr_info("tuner subdev registration failure\n"); |
1046 | else | 1046 | else |
1047 | cx231xx_config_tuner(dev); | 1047 | cx231xx_config_tuner(dev); |
1048 | } | 1048 | } |
@@ -1148,7 +1148,7 @@ static int cx231xx_init_dev(struct cx231xx *dev, struct usb_device *udev, | |||
1148 | /* Query cx231xx to find what pcb config it is related to */ | 1148 | /* Query cx231xx to find what pcb config it is related to */ |
1149 | retval = initialize_cx231xx(dev); | 1149 | retval = initialize_cx231xx(dev); |
1150 | if (retval < 0) { | 1150 | if (retval < 0) { |
1151 | cx231xx_errdev("Failed to read PCB config\n"); | 1151 | pr_err("Failed to read PCB config\n"); |
1152 | return retval; | 1152 | return retval; |
1153 | } | 1153 | } |
1154 | 1154 | ||
@@ -1164,7 +1164,7 @@ static int cx231xx_init_dev(struct cx231xx *dev, struct usb_device *udev, | |||
1164 | 1164 | ||
1165 | retval = cx231xx_config(dev); | 1165 | retval = cx231xx_config(dev); |
1166 | if (retval) { | 1166 | if (retval) { |
1167 | cx231xx_errdev("error configuring device\n"); | 1167 | pr_err("error configuring device\n"); |
1168 | return -ENOMEM; | 1168 | return -ENOMEM; |
1169 | } | 1169 | } |
1170 | 1170 | ||
@@ -1174,7 +1174,7 @@ static int cx231xx_init_dev(struct cx231xx *dev, struct usb_device *udev, | |||
1174 | /* register i2c bus */ | 1174 | /* register i2c bus */ |
1175 | retval = cx231xx_dev_init(dev); | 1175 | retval = cx231xx_dev_init(dev); |
1176 | if (retval) { | 1176 | if (retval) { |
1177 | cx231xx_errdev("%s: cx231xx_i2c_register - errCode [%d]!\n", | 1177 | pr_err("%s: cx231xx_i2c_register - errCode [%d]!\n", |
1178 | __func__, retval); | 1178 | __func__, retval); |
1179 | goto err_dev_init; | 1179 | goto err_dev_init; |
1180 | } | 1180 | } |
@@ -1196,7 +1196,7 @@ static int cx231xx_init_dev(struct cx231xx *dev, struct usb_device *udev, | |||
1196 | 1196 | ||
1197 | retval = cx231xx_config(dev); | 1197 | retval = cx231xx_config(dev); |
1198 | if (retval) { | 1198 | if (retval) { |
1199 | cx231xx_errdev("%s: cx231xx_config - errCode [%d]!\n", | 1199 | pr_err("%s: cx231xx_config - errCode [%d]!\n", |
1200 | __func__, retval); | 1200 | __func__, retval); |
1201 | goto err_dev_init; | 1201 | goto err_dev_init; |
1202 | } | 1202 | } |
@@ -1281,7 +1281,7 @@ static int cx231xx_init_v4l2(struct cx231xx *dev, | |||
1281 | /* compute alternate max packet sizes for video */ | 1281 | /* compute alternate max packet sizes for video */ |
1282 | idx = dev->current_pcb_config.hs_config_info[0].interface_info.video_index + 1; | 1282 | idx = dev->current_pcb_config.hs_config_info[0].interface_info.video_index + 1; |
1283 | if (idx >= dev->max_iad_interface_count) { | 1283 | if (idx >= dev->max_iad_interface_count) { |
1284 | cx231xx_errdev("Video PCB interface #%d doesn't exist\n", idx); | 1284 | pr_err("Video PCB interface #%d doesn't exist\n", idx); |
1285 | return -ENODEV; | 1285 | return -ENODEV; |
1286 | } | 1286 | } |
1287 | 1287 | ||
@@ -1290,20 +1290,20 @@ static int cx231xx_init_v4l2(struct cx231xx *dev, | |||
1290 | dev->video_mode.end_point_addr = uif->altsetting[0].endpoint[isoc_pipe].desc.bEndpointAddress; | 1290 | dev->video_mode.end_point_addr = uif->altsetting[0].endpoint[isoc_pipe].desc.bEndpointAddress; |
1291 | dev->video_mode.num_alt = uif->num_altsetting; | 1291 | dev->video_mode.num_alt = uif->num_altsetting; |
1292 | 1292 | ||
1293 | cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n", | 1293 | pr_info("EndPoint Addr 0x%x, Alternate settings: %i\n", |
1294 | dev->video_mode.end_point_addr, | 1294 | dev->video_mode.end_point_addr, |
1295 | dev->video_mode.num_alt); | 1295 | dev->video_mode.num_alt); |
1296 | 1296 | ||
1297 | dev->video_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->video_mode.num_alt, GFP_KERNEL); | 1297 | dev->video_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->video_mode.num_alt, GFP_KERNEL); |
1298 | if (dev->video_mode.alt_max_pkt_size == NULL) { | 1298 | if (dev->video_mode.alt_max_pkt_size == NULL) { |
1299 | cx231xx_errdev("out of memory!\n"); | 1299 | pr_err("out of memory!\n"); |
1300 | return -ENOMEM; | 1300 | return -ENOMEM; |
1301 | } | 1301 | } |
1302 | 1302 | ||
1303 | for (i = 0; i < dev->video_mode.num_alt; i++) { | 1303 | for (i = 0; i < dev->video_mode.num_alt; i++) { |
1304 | u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].desc.wMaxPacketSize); | 1304 | u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].desc.wMaxPacketSize); |
1305 | dev->video_mode.alt_max_pkt_size[i] = (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); | 1305 | dev->video_mode.alt_max_pkt_size[i] = (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); |
1306 | cx231xx_info("Alternate setting %i, max size= %i\n", i, | 1306 | pr_info("Alternate setting %i, max size= %i\n", i, |
1307 | dev->video_mode.alt_max_pkt_size[i]); | 1307 | dev->video_mode.alt_max_pkt_size[i]); |
1308 | } | 1308 | } |
1309 | 1309 | ||
@@ -1311,7 +1311,7 @@ static int cx231xx_init_v4l2(struct cx231xx *dev, | |||
1311 | 1311 | ||
1312 | idx = dev->current_pcb_config.hs_config_info[0].interface_info.vanc_index + 1; | 1312 | idx = dev->current_pcb_config.hs_config_info[0].interface_info.vanc_index + 1; |
1313 | if (idx >= dev->max_iad_interface_count) { | 1313 | if (idx >= dev->max_iad_interface_count) { |
1314 | cx231xx_errdev("VBI PCB interface #%d doesn't exist\n", idx); | 1314 | pr_err("VBI PCB interface #%d doesn't exist\n", idx); |
1315 | return -ENODEV; | 1315 | return -ENODEV; |
1316 | } | 1316 | } |
1317 | uif = udev->actconfig->interface[idx]; | 1317 | uif = udev->actconfig->interface[idx]; |
@@ -1321,14 +1321,14 @@ static int cx231xx_init_v4l2(struct cx231xx *dev, | |||
1321 | bEndpointAddress; | 1321 | bEndpointAddress; |
1322 | 1322 | ||
1323 | dev->vbi_mode.num_alt = uif->num_altsetting; | 1323 | dev->vbi_mode.num_alt = uif->num_altsetting; |
1324 | cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n", | 1324 | pr_info("EndPoint Addr 0x%x, Alternate settings: %i\n", |
1325 | dev->vbi_mode.end_point_addr, | 1325 | dev->vbi_mode.end_point_addr, |
1326 | dev->vbi_mode.num_alt); | 1326 | dev->vbi_mode.num_alt); |
1327 | 1327 | ||
1328 | /* compute alternate max packet sizes for vbi */ | 1328 | /* compute alternate max packet sizes for vbi */ |
1329 | dev->vbi_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->vbi_mode.num_alt, GFP_KERNEL); | 1329 | dev->vbi_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->vbi_mode.num_alt, GFP_KERNEL); |
1330 | if (dev->vbi_mode.alt_max_pkt_size == NULL) { | 1330 | if (dev->vbi_mode.alt_max_pkt_size == NULL) { |
1331 | cx231xx_errdev("out of memory!\n"); | 1331 | pr_err("out of memory!\n"); |
1332 | return -ENOMEM; | 1332 | return -ENOMEM; |
1333 | } | 1333 | } |
1334 | 1334 | ||
@@ -1338,7 +1338,7 @@ static int cx231xx_init_v4l2(struct cx231xx *dev, | |||
1338 | desc.wMaxPacketSize); | 1338 | desc.wMaxPacketSize); |
1339 | dev->vbi_mode.alt_max_pkt_size[i] = | 1339 | dev->vbi_mode.alt_max_pkt_size[i] = |
1340 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); | 1340 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); |
1341 | cx231xx_info("Alternate setting %i, max size= %i\n", i, | 1341 | pr_info("Alternate setting %i, max size= %i\n", i, |
1342 | dev->vbi_mode.alt_max_pkt_size[i]); | 1342 | dev->vbi_mode.alt_max_pkt_size[i]); |
1343 | } | 1343 | } |
1344 | 1344 | ||
@@ -1347,7 +1347,7 @@ static int cx231xx_init_v4l2(struct cx231xx *dev, | |||
1347 | /* compute alternate max packet sizes for sliced CC */ | 1347 | /* compute alternate max packet sizes for sliced CC */ |
1348 | idx = dev->current_pcb_config.hs_config_info[0].interface_info.hanc_index + 1; | 1348 | idx = dev->current_pcb_config.hs_config_info[0].interface_info.hanc_index + 1; |
1349 | if (idx >= dev->max_iad_interface_count) { | 1349 | if (idx >= dev->max_iad_interface_count) { |
1350 | cx231xx_errdev("Sliced CC PCB interface #%d doesn't exist\n", idx); | 1350 | pr_err("Sliced CC PCB interface #%d doesn't exist\n", idx); |
1351 | return -ENODEV; | 1351 | return -ENODEV; |
1352 | } | 1352 | } |
1353 | uif = udev->actconfig->interface[idx]; | 1353 | uif = udev->actconfig->interface[idx]; |
@@ -1357,13 +1357,13 @@ static int cx231xx_init_v4l2(struct cx231xx *dev, | |||
1357 | bEndpointAddress; | 1357 | bEndpointAddress; |
1358 | 1358 | ||
1359 | dev->sliced_cc_mode.num_alt = uif->num_altsetting; | 1359 | dev->sliced_cc_mode.num_alt = uif->num_altsetting; |
1360 | cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n", | 1360 | pr_info("EndPoint Addr 0x%x, Alternate settings: %i\n", |
1361 | dev->sliced_cc_mode.end_point_addr, | 1361 | dev->sliced_cc_mode.end_point_addr, |
1362 | dev->sliced_cc_mode.num_alt); | 1362 | dev->sliced_cc_mode.num_alt); |
1363 | dev->sliced_cc_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->sliced_cc_mode.num_alt, GFP_KERNEL); | 1363 | dev->sliced_cc_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->sliced_cc_mode.num_alt, GFP_KERNEL); |
1364 | 1364 | ||
1365 | if (dev->sliced_cc_mode.alt_max_pkt_size == NULL) { | 1365 | if (dev->sliced_cc_mode.alt_max_pkt_size == NULL) { |
1366 | cx231xx_errdev("out of memory!\n"); | 1366 | pr_err("out of memory!\n"); |
1367 | return -ENOMEM; | 1367 | return -ENOMEM; |
1368 | } | 1368 | } |
1369 | 1369 | ||
@@ -1372,7 +1372,7 @@ static int cx231xx_init_v4l2(struct cx231xx *dev, | |||
1372 | desc.wMaxPacketSize); | 1372 | desc.wMaxPacketSize); |
1373 | dev->sliced_cc_mode.alt_max_pkt_size[i] = | 1373 | dev->sliced_cc_mode.alt_max_pkt_size[i] = |
1374 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); | 1374 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); |
1375 | cx231xx_info("Alternate setting %i, max size= %i\n", i, | 1375 | pr_info("Alternate setting %i, max size= %i\n", i, |
1376 | dev->sliced_cc_mode.alt_max_pkt_size[i]); | 1376 | dev->sliced_cc_mode.alt_max_pkt_size[i]); |
1377 | } | 1377 | } |
1378 | 1378 | ||
@@ -1410,7 +1410,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1410 | nr = find_first_zero_bit(&cx231xx_devused, CX231XX_MAXBOARDS); | 1410 | nr = find_first_zero_bit(&cx231xx_devused, CX231XX_MAXBOARDS); |
1411 | if (nr >= CX231XX_MAXBOARDS) { | 1411 | if (nr >= CX231XX_MAXBOARDS) { |
1412 | /* No free device slots */ | 1412 | /* No free device slots */ |
1413 | cx231xx_err(DRIVER_NAME ": Supports only %i devices.\n", | 1413 | pr_err(DRIVER_NAME ": Supports only %i devices.\n", |
1414 | CX231XX_MAXBOARDS); | 1414 | CX231XX_MAXBOARDS); |
1415 | return -ENOMEM; | 1415 | return -ENOMEM; |
1416 | } | 1416 | } |
@@ -1421,7 +1421,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1421 | /* allocate memory for our device state and initialize it */ | 1421 | /* allocate memory for our device state and initialize it */ |
1422 | dev = devm_kzalloc(&udev->dev, sizeof(*dev), GFP_KERNEL); | 1422 | dev = devm_kzalloc(&udev->dev, sizeof(*dev), GFP_KERNEL); |
1423 | if (dev == NULL) { | 1423 | if (dev == NULL) { |
1424 | cx231xx_err(DRIVER_NAME ": out of memory!\n"); | 1424 | pr_err(DRIVER_NAME ": out of memory!\n"); |
1425 | clear_bit(nr, &cx231xx_devused); | 1425 | clear_bit(nr, &cx231xx_devused); |
1426 | return -ENOMEM; | 1426 | return -ENOMEM; |
1427 | } | 1427 | } |
@@ -1468,7 +1468,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1468 | speed = "unknown"; | 1468 | speed = "unknown"; |
1469 | } | 1469 | } |
1470 | 1470 | ||
1471 | cx231xx_info("New device %s %s @ %s Mbps " | 1471 | pr_info("New device %s %s @ %s Mbps " |
1472 | "(%04x:%04x) with %d interfaces\n", | 1472 | "(%04x:%04x) with %d interfaces\n", |
1473 | udev->manufacturer ? udev->manufacturer : "", | 1473 | udev->manufacturer ? udev->manufacturer : "", |
1474 | udev->product ? udev->product : "", | 1474 | udev->product ? udev->product : "", |
@@ -1485,13 +1485,13 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1485 | 1485 | ||
1486 | assoc_desc = udev->actconfig->intf_assoc[0]; | 1486 | assoc_desc = udev->actconfig->intf_assoc[0]; |
1487 | if (assoc_desc->bFirstInterface != ifnum) { | 1487 | if (assoc_desc->bFirstInterface != ifnum) { |
1488 | cx231xx_err(DRIVER_NAME ": Not found " | 1488 | pr_err(DRIVER_NAME ": Not found " |
1489 | "matching IAD interface\n"); | 1489 | "matching IAD interface\n"); |
1490 | retval = -ENODEV; | 1490 | retval = -ENODEV; |
1491 | goto err_if; | 1491 | goto err_if; |
1492 | } | 1492 | } |
1493 | 1493 | ||
1494 | cx231xx_info("registering interface %d\n", ifnum); | 1494 | pr_info("registering interface %d\n", ifnum); |
1495 | 1495 | ||
1496 | /* save our data pointer in this interface device */ | 1496 | /* save our data pointer in this interface device */ |
1497 | usb_set_intfdata(interface, dev); | 1497 | usb_set_intfdata(interface, dev); |
@@ -1499,7 +1499,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1499 | /* Create v4l2 device */ | 1499 | /* Create v4l2 device */ |
1500 | retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); | 1500 | retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); |
1501 | if (retval) { | 1501 | if (retval) { |
1502 | cx231xx_errdev("v4l2_device_register failed\n"); | 1502 | pr_err("v4l2_device_register failed\n"); |
1503 | goto err_v4l2; | 1503 | goto err_v4l2; |
1504 | } | 1504 | } |
1505 | 1505 | ||
@@ -1516,7 +1516,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1516 | /* compute alternate max packet sizes for TS1 */ | 1516 | /* compute alternate max packet sizes for TS1 */ |
1517 | idx = dev->current_pcb_config.hs_config_info[0].interface_info.ts1_index + 1; | 1517 | idx = dev->current_pcb_config.hs_config_info[0].interface_info.ts1_index + 1; |
1518 | if (idx >= dev->max_iad_interface_count) { | 1518 | if (idx >= dev->max_iad_interface_count) { |
1519 | cx231xx_errdev("TS1 PCB interface #%d doesn't exist\n", idx); | 1519 | pr_err("TS1 PCB interface #%d doesn't exist\n", idx); |
1520 | retval = -ENODEV; | 1520 | retval = -ENODEV; |
1521 | goto err_video_alt; | 1521 | goto err_video_alt; |
1522 | } | 1522 | } |
@@ -1527,13 +1527,13 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1527 | desc.bEndpointAddress; | 1527 | desc.bEndpointAddress; |
1528 | 1528 | ||
1529 | dev->ts1_mode.num_alt = uif->num_altsetting; | 1529 | dev->ts1_mode.num_alt = uif->num_altsetting; |
1530 | cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n", | 1530 | pr_info("EndPoint Addr 0x%x, Alternate settings: %i\n", |
1531 | dev->ts1_mode.end_point_addr, | 1531 | dev->ts1_mode.end_point_addr, |
1532 | dev->ts1_mode.num_alt); | 1532 | dev->ts1_mode.num_alt); |
1533 | 1533 | ||
1534 | dev->ts1_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->ts1_mode.num_alt, GFP_KERNEL); | 1534 | dev->ts1_mode.alt_max_pkt_size = devm_kmalloc_array(&udev->dev, 32, dev->ts1_mode.num_alt, GFP_KERNEL); |
1535 | if (dev->ts1_mode.alt_max_pkt_size == NULL) { | 1535 | if (dev->ts1_mode.alt_max_pkt_size == NULL) { |
1536 | cx231xx_errdev("out of memory!\n"); | 1536 | pr_err("out of memory!\n"); |
1537 | retval = -ENOMEM; | 1537 | retval = -ENOMEM; |
1538 | goto err_video_alt; | 1538 | goto err_video_alt; |
1539 | } | 1539 | } |
@@ -1544,7 +1544,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface, | |||
1544 | wMaxPacketSize); | 1544 | wMaxPacketSize); |
1545 | dev->ts1_mode.alt_max_pkt_size[i] = | 1545 | dev->ts1_mode.alt_max_pkt_size[i] = |
1546 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); | 1546 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); |
1547 | cx231xx_info("Alternate setting %i, max size= %i\n", i, | 1547 | pr_info("Alternate setting %i, max size= %i\n", i, |
1548 | dev->ts1_mode.alt_max_pkt_size[i]); | 1548 | dev->ts1_mode.alt_max_pkt_size[i]); |
1549 | } | 1549 | } |
1550 | } | 1550 | } |
@@ -1609,7 +1609,7 @@ static void cx231xx_usb_disconnect(struct usb_interface *interface) | |||
1609 | wake_up_interruptible_all(&dev->open); | 1609 | wake_up_interruptible_all(&dev->open); |
1610 | 1610 | ||
1611 | if (dev->users) { | 1611 | if (dev->users) { |
1612 | cx231xx_warn | 1612 | pr_warn |
1613 | ("device %s is open! Deregistration and memory " | 1613 | ("device %s is open! Deregistration and memory " |
1614 | "deallocation are deferred on close.\n", | 1614 | "deallocation are deferred on close.\n", |
1615 | video_device_node_name(dev->vdev)); | 1615 | video_device_node_name(dev->vdev)); |
diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c b/drivers/media/usb/cx231xx/cx231xx-core.c index 9b5cd9e9b169..229e855fc7f2 100644 --- a/drivers/media/usb/cx231xx/cx231xx-core.c +++ b/drivers/media/usb/cx231xx/cx231xx-core.c | |||
@@ -20,6 +20,7 @@ | |||
20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include "cx231xx.h" | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/list.h> | 25 | #include <linux/list.h> |
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
@@ -29,7 +30,6 @@ | |||
29 | #include <media/v4l2-common.h> | 30 | #include <media/v4l2-common.h> |
30 | #include <media/tuner.h> | 31 | #include <media/tuner.h> |
31 | 32 | ||
32 | #include "cx231xx.h" | ||
33 | #include "cx231xx-reg.h" | 33 | #include "cx231xx-reg.h" |
34 | 34 | ||
35 | /* #define ENABLE_DEBUG_ISOC_FRAMES */ | 35 | /* #define ENABLE_DEBUG_ISOC_FRAMES */ |
@@ -228,7 +228,7 @@ int cx231xx_send_usb_command(struct cx231xx_i2c *i2c_bus, | |||
228 | /* call common vendor command request */ | 228 | /* call common vendor command request */ |
229 | status = cx231xx_send_vendor_cmd(dev, &ven_req); | 229 | status = cx231xx_send_vendor_cmd(dev, &ven_req); |
230 | if (status < 0) { | 230 | if (status < 0) { |
231 | cx231xx_info | 231 | pr_info |
232 | ("UsbInterface::sendCommand, failed with status -%d\n", | 232 | ("UsbInterface::sendCommand, failed with status -%d\n", |
233 | status); | 233 | status); |
234 | } | 234 | } |
@@ -524,7 +524,7 @@ int cx231xx_set_video_alternate(struct cx231xx *dev) | |||
524 | usb_set_interface(dev->udev, usb_interface_index, | 524 | usb_set_interface(dev->udev, usb_interface_index, |
525 | dev->video_mode.alt); | 525 | dev->video_mode.alt); |
526 | if (errCode < 0) { | 526 | if (errCode < 0) { |
527 | cx231xx_errdev | 527 | pr_err |
528 | ("cannot change alt number to %d (error=%i)\n", | 528 | ("cannot change alt number to %d (error=%i)\n", |
529 | dev->video_mode.alt, errCode); | 529 | dev->video_mode.alt, errCode); |
530 | return errCode; | 530 | return errCode; |
@@ -600,7 +600,7 @@ int cx231xx_set_alt_setting(struct cx231xx *dev, u8 index, u8 alt) | |||
600 | } | 600 | } |
601 | 601 | ||
602 | if (alt > 0 && max_pkt_size == 0) { | 602 | if (alt > 0 && max_pkt_size == 0) { |
603 | cx231xx_errdev | 603 | pr_err |
604 | ("can't change interface %d alt no. to %d: Max. Pkt size = 0\n", | 604 | ("can't change interface %d alt no. to %d: Max. Pkt size = 0\n", |
605 | usb_interface_index, alt); | 605 | usb_interface_index, alt); |
606 | /*To workaround error number=-71 on EP0 for videograbber, | 606 | /*To workaround error number=-71 on EP0 for videograbber, |
@@ -616,7 +616,7 @@ int cx231xx_set_alt_setting(struct cx231xx *dev, u8 index, u8 alt) | |||
616 | if (usb_interface_index > 0) { | 616 | if (usb_interface_index > 0) { |
617 | status = usb_set_interface(dev->udev, usb_interface_index, alt); | 617 | status = usb_set_interface(dev->udev, usb_interface_index, alt); |
618 | if (status < 0) { | 618 | if (status < 0) { |
619 | cx231xx_errdev | 619 | pr_err |
620 | ("can't change interface %d alt no. to %d (err=%i)\n", | 620 | ("can't change interface %d alt no. to %d (err=%i)\n", |
621 | usb_interface_index, alt, status); | 621 | usb_interface_index, alt, status); |
622 | return status; | 622 | return status; |
@@ -768,7 +768,7 @@ int cx231xx_ep5_bulkout(struct cx231xx *dev, u8 *firmware, u16 size) | |||
768 | 768 | ||
769 | buffer = kzalloc(4096, GFP_KERNEL); | 769 | buffer = kzalloc(4096, GFP_KERNEL); |
770 | if (buffer == NULL) { | 770 | if (buffer == NULL) { |
771 | cx231xx_info("out of mem\n"); | 771 | pr_info("out of mem\n"); |
772 | return -ENOMEM; | 772 | return -ENOMEM; |
773 | } | 773 | } |
774 | memcpy(&buffer[0], firmware, 4096); | 774 | memcpy(&buffer[0], firmware, 4096); |
@@ -777,7 +777,7 @@ int cx231xx_ep5_bulkout(struct cx231xx *dev, u8 *firmware, u16 size) | |||
777 | buffer, 4096, &actlen, 2000); | 777 | buffer, 4096, &actlen, 2000); |
778 | 778 | ||
779 | if (ret) | 779 | if (ret) |
780 | cx231xx_info("bulk message failed: %d (%d/%d)", ret, | 780 | pr_info("bulk message failed: %d (%d/%d)", ret, |
781 | size, actlen); | 781 | size, actlen); |
782 | else { | 782 | else { |
783 | errCode = actlen != size ? -1 : 0; | 783 | errCode = actlen != size ? -1 : 0; |
@@ -988,7 +988,7 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets, | |||
988 | 988 | ||
989 | dma_q->p_left_data = kzalloc(4096, GFP_KERNEL); | 989 | dma_q->p_left_data = kzalloc(4096, GFP_KERNEL); |
990 | if (dma_q->p_left_data == NULL) { | 990 | if (dma_q->p_left_data == NULL) { |
991 | cx231xx_info("out of mem\n"); | 991 | pr_info("out of mem\n"); |
992 | return -ENOMEM; | 992 | return -ENOMEM; |
993 | } | 993 | } |
994 | 994 | ||
@@ -1018,14 +1018,14 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets, | |||
1018 | dev->video_mode.isoc_ctl.urb = | 1018 | dev->video_mode.isoc_ctl.urb = |
1019 | kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL); | 1019 | kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL); |
1020 | if (!dev->video_mode.isoc_ctl.urb) { | 1020 | if (!dev->video_mode.isoc_ctl.urb) { |
1021 | cx231xx_errdev("cannot alloc memory for usb buffers\n"); | 1021 | pr_err("cannot alloc memory for usb buffers\n"); |
1022 | return -ENOMEM; | 1022 | return -ENOMEM; |
1023 | } | 1023 | } |
1024 | 1024 | ||
1025 | dev->video_mode.isoc_ctl.transfer_buffer = | 1025 | dev->video_mode.isoc_ctl.transfer_buffer = |
1026 | kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL); | 1026 | kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL); |
1027 | if (!dev->video_mode.isoc_ctl.transfer_buffer) { | 1027 | if (!dev->video_mode.isoc_ctl.transfer_buffer) { |
1028 | cx231xx_errdev("cannot allocate memory for usbtransfer\n"); | 1028 | pr_err("cannot allocate memory for usbtransfer\n"); |
1029 | kfree(dev->video_mode.isoc_ctl.urb); | 1029 | kfree(dev->video_mode.isoc_ctl.urb); |
1030 | return -ENOMEM; | 1030 | return -ENOMEM; |
1031 | } | 1031 | } |
@@ -1045,7 +1045,7 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets, | |||
1045 | for (i = 0; i < dev->video_mode.isoc_ctl.num_bufs; i++) { | 1045 | for (i = 0; i < dev->video_mode.isoc_ctl.num_bufs; i++) { |
1046 | urb = usb_alloc_urb(max_packets, GFP_KERNEL); | 1046 | urb = usb_alloc_urb(max_packets, GFP_KERNEL); |
1047 | if (!urb) { | 1047 | if (!urb) { |
1048 | cx231xx_err("cannot alloc isoc_ctl.urb %i\n", i); | 1048 | pr_err("cannot alloc isoc_ctl.urb %i\n", i); |
1049 | cx231xx_uninit_isoc(dev); | 1049 | cx231xx_uninit_isoc(dev); |
1050 | return -ENOMEM; | 1050 | return -ENOMEM; |
1051 | } | 1051 | } |
@@ -1055,7 +1055,7 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets, | |||
1055 | usb_alloc_coherent(dev->udev, sb_size, GFP_KERNEL, | 1055 | usb_alloc_coherent(dev->udev, sb_size, GFP_KERNEL, |
1056 | &urb->transfer_dma); | 1056 | &urb->transfer_dma); |
1057 | if (!dev->video_mode.isoc_ctl.transfer_buffer[i]) { | 1057 | if (!dev->video_mode.isoc_ctl.transfer_buffer[i]) { |
1058 | cx231xx_err("unable to allocate %i bytes for transfer" | 1058 | pr_err("unable to allocate %i bytes for transfer" |
1059 | " buffer %i%s\n", | 1059 | " buffer %i%s\n", |
1060 | sb_size, i, | 1060 | sb_size, i, |
1061 | in_interrupt() ? " while in int" : ""); | 1061 | in_interrupt() ? " while in int" : ""); |
@@ -1090,7 +1090,7 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets, | |||
1090 | rc = usb_submit_urb(dev->video_mode.isoc_ctl.urb[i], | 1090 | rc = usb_submit_urb(dev->video_mode.isoc_ctl.urb[i], |
1091 | GFP_ATOMIC); | 1091 | GFP_ATOMIC); |
1092 | if (rc) { | 1092 | if (rc) { |
1093 | cx231xx_err("submit of urb %i failed (error=%i)\n", i, | 1093 | pr_err("submit of urb %i failed (error=%i)\n", i, |
1094 | rc); | 1094 | rc); |
1095 | cx231xx_uninit_isoc(dev); | 1095 | cx231xx_uninit_isoc(dev); |
1096 | return rc; | 1096 | return rc; |
@@ -1151,14 +1151,14 @@ int cx231xx_init_bulk(struct cx231xx *dev, int max_packets, | |||
1151 | dev->video_mode.bulk_ctl.urb = | 1151 | dev->video_mode.bulk_ctl.urb = |
1152 | kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL); | 1152 | kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL); |
1153 | if (!dev->video_mode.bulk_ctl.urb) { | 1153 | if (!dev->video_mode.bulk_ctl.urb) { |
1154 | cx231xx_errdev("cannot alloc memory for usb buffers\n"); | 1154 | pr_err("cannot alloc memory for usb buffers\n"); |
1155 | return -ENOMEM; | 1155 | return -ENOMEM; |
1156 | } | 1156 | } |
1157 | 1157 | ||
1158 | dev->video_mode.bulk_ctl.transfer_buffer = | 1158 | dev->video_mode.bulk_ctl.transfer_buffer = |
1159 | kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL); | 1159 | kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL); |
1160 | if (!dev->video_mode.bulk_ctl.transfer_buffer) { | 1160 | if (!dev->video_mode.bulk_ctl.transfer_buffer) { |
1161 | cx231xx_errdev("cannot allocate memory for usbtransfer\n"); | 1161 | pr_err("cannot allocate memory for usbtransfer\n"); |
1162 | kfree(dev->video_mode.bulk_ctl.urb); | 1162 | kfree(dev->video_mode.bulk_ctl.urb); |
1163 | return -ENOMEM; | 1163 | return -ENOMEM; |
1164 | } | 1164 | } |
@@ -1178,7 +1178,7 @@ int cx231xx_init_bulk(struct cx231xx *dev, int max_packets, | |||
1178 | for (i = 0; i < dev->video_mode.bulk_ctl.num_bufs; i++) { | 1178 | for (i = 0; i < dev->video_mode.bulk_ctl.num_bufs; i++) { |
1179 | urb = usb_alloc_urb(0, GFP_KERNEL); | 1179 | urb = usb_alloc_urb(0, GFP_KERNEL); |
1180 | if (!urb) { | 1180 | if (!urb) { |
1181 | cx231xx_err("cannot alloc bulk_ctl.urb %i\n", i); | 1181 | pr_err("cannot alloc bulk_ctl.urb %i\n", i); |
1182 | cx231xx_uninit_bulk(dev); | 1182 | cx231xx_uninit_bulk(dev); |
1183 | return -ENOMEM; | 1183 | return -ENOMEM; |
1184 | } | 1184 | } |
@@ -1189,7 +1189,7 @@ int cx231xx_init_bulk(struct cx231xx *dev, int max_packets, | |||
1189 | usb_alloc_coherent(dev->udev, sb_size, GFP_KERNEL, | 1189 | usb_alloc_coherent(dev->udev, sb_size, GFP_KERNEL, |
1190 | &urb->transfer_dma); | 1190 | &urb->transfer_dma); |
1191 | if (!dev->video_mode.bulk_ctl.transfer_buffer[i]) { | 1191 | if (!dev->video_mode.bulk_ctl.transfer_buffer[i]) { |
1192 | cx231xx_err("unable to allocate %i bytes for transfer" | 1192 | pr_err("unable to allocate %i bytes for transfer" |
1193 | " buffer %i%s\n", | 1193 | " buffer %i%s\n", |
1194 | sb_size, i, | 1194 | sb_size, i, |
1195 | in_interrupt() ? " while in int" : ""); | 1195 | in_interrupt() ? " while in int" : ""); |
@@ -1212,7 +1212,7 @@ int cx231xx_init_bulk(struct cx231xx *dev, int max_packets, | |||
1212 | rc = usb_submit_urb(dev->video_mode.bulk_ctl.urb[i], | 1212 | rc = usb_submit_urb(dev->video_mode.bulk_ctl.urb[i], |
1213 | GFP_ATOMIC); | 1213 | GFP_ATOMIC); |
1214 | if (rc) { | 1214 | if (rc) { |
1215 | cx231xx_err("submit of urb %i failed (error=%i)\n", i, | 1215 | pr_err("submit of urb %i failed (error=%i)\n", i, |
1216 | rc); | 1216 | rc); |
1217 | cx231xx_uninit_bulk(dev); | 1217 | cx231xx_uninit_bulk(dev); |
1218 | return rc; | 1218 | return rc; |
@@ -1316,7 +1316,7 @@ int cx231xx_dev_init(struct cx231xx *dev) | |||
1316 | errCode = cx231xx_set_power_mode(dev, | 1316 | errCode = cx231xx_set_power_mode(dev, |
1317 | POLARIS_AVMODE_ENXTERNAL_AV); | 1317 | POLARIS_AVMODE_ENXTERNAL_AV); |
1318 | if (errCode < 0) { | 1318 | if (errCode < 0) { |
1319 | cx231xx_errdev | 1319 | pr_err |
1320 | ("%s: Failed to set Power - errCode [%d]!\n", | 1320 | ("%s: Failed to set Power - errCode [%d]!\n", |
1321 | __func__, errCode); | 1321 | __func__, errCode); |
1322 | return errCode; | 1322 | return errCode; |
@@ -1325,7 +1325,7 @@ int cx231xx_dev_init(struct cx231xx *dev) | |||
1325 | errCode = cx231xx_set_power_mode(dev, | 1325 | errCode = cx231xx_set_power_mode(dev, |
1326 | POLARIS_AVMODE_ANALOGT_TV); | 1326 | POLARIS_AVMODE_ANALOGT_TV); |
1327 | if (errCode < 0) { | 1327 | if (errCode < 0) { |
1328 | cx231xx_errdev | 1328 | pr_err |
1329 | ("%s: Failed to set Power - errCode [%d]!\n", | 1329 | ("%s: Failed to set Power - errCode [%d]!\n", |
1330 | __func__, errCode); | 1330 | __func__, errCode); |
1331 | return errCode; | 1331 | return errCode; |
@@ -1340,14 +1340,14 @@ int cx231xx_dev_init(struct cx231xx *dev) | |||
1340 | /* initialize Colibri block */ | 1340 | /* initialize Colibri block */ |
1341 | errCode = cx231xx_afe_init_super_block(dev, 0x23c); | 1341 | errCode = cx231xx_afe_init_super_block(dev, 0x23c); |
1342 | if (errCode < 0) { | 1342 | if (errCode < 0) { |
1343 | cx231xx_errdev | 1343 | pr_err |
1344 | ("%s: cx231xx_afe init super block - errCode [%d]!\n", | 1344 | ("%s: cx231xx_afe init super block - errCode [%d]!\n", |
1345 | __func__, errCode); | 1345 | __func__, errCode); |
1346 | return errCode; | 1346 | return errCode; |
1347 | } | 1347 | } |
1348 | errCode = cx231xx_afe_init_channels(dev); | 1348 | errCode = cx231xx_afe_init_channels(dev); |
1349 | if (errCode < 0) { | 1349 | if (errCode < 0) { |
1350 | cx231xx_errdev | 1350 | pr_err |
1351 | ("%s: cx231xx_afe init channels - errCode [%d]!\n", | 1351 | ("%s: cx231xx_afe init channels - errCode [%d]!\n", |
1352 | __func__, errCode); | 1352 | __func__, errCode); |
1353 | return errCode; | 1353 | return errCode; |
@@ -1356,7 +1356,7 @@ int cx231xx_dev_init(struct cx231xx *dev) | |||
1356 | /* Set DIF in By pass mode */ | 1356 | /* Set DIF in By pass mode */ |
1357 | errCode = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND); | 1357 | errCode = cx231xx_dif_set_standard(dev, DIF_USE_BASEBAND); |
1358 | if (errCode < 0) { | 1358 | if (errCode < 0) { |
1359 | cx231xx_errdev | 1359 | pr_err |
1360 | ("%s: cx231xx_dif set to By pass mode - errCode [%d]!\n", | 1360 | ("%s: cx231xx_dif set to By pass mode - errCode [%d]!\n", |
1361 | __func__, errCode); | 1361 | __func__, errCode); |
1362 | return errCode; | 1362 | return errCode; |
@@ -1365,7 +1365,7 @@ int cx231xx_dev_init(struct cx231xx *dev) | |||
1365 | /* I2S block related functions */ | 1365 | /* I2S block related functions */ |
1366 | errCode = cx231xx_i2s_blk_initialize(dev); | 1366 | errCode = cx231xx_i2s_blk_initialize(dev); |
1367 | if (errCode < 0) { | 1367 | if (errCode < 0) { |
1368 | cx231xx_errdev | 1368 | pr_err |
1369 | ("%s: cx231xx_i2s block initialize - errCode [%d]!\n", | 1369 | ("%s: cx231xx_i2s block initialize - errCode [%d]!\n", |
1370 | __func__, errCode); | 1370 | __func__, errCode); |
1371 | return errCode; | 1371 | return errCode; |
@@ -1374,7 +1374,7 @@ int cx231xx_dev_init(struct cx231xx *dev) | |||
1374 | /* init control pins */ | 1374 | /* init control pins */ |
1375 | errCode = cx231xx_init_ctrl_pin_status(dev); | 1375 | errCode = cx231xx_init_ctrl_pin_status(dev); |
1376 | if (errCode < 0) { | 1376 | if (errCode < 0) { |
1377 | cx231xx_errdev("%s: cx231xx_init ctrl pins - errCode [%d]!\n", | 1377 | pr_err("%s: cx231xx_init ctrl pins - errCode [%d]!\n", |
1378 | __func__, errCode); | 1378 | __func__, errCode); |
1379 | return errCode; | 1379 | return errCode; |
1380 | } | 1380 | } |
@@ -1400,7 +1400,7 @@ int cx231xx_dev_init(struct cx231xx *dev) | |||
1400 | break; | 1400 | break; |
1401 | } | 1401 | } |
1402 | if (errCode < 0) { | 1402 | if (errCode < 0) { |
1403 | cx231xx_errdev | 1403 | pr_err |
1404 | ("%s: cx231xx_AGC mode to Analog - errCode [%d]!\n", | 1404 | ("%s: cx231xx_AGC mode to Analog - errCode [%d]!\n", |
1405 | __func__, errCode); | 1405 | __func__, errCode); |
1406 | return errCode; | 1406 | return errCode; |
@@ -1477,7 +1477,7 @@ int cx231xx_send_gpio_cmd(struct cx231xx *dev, u32 gpio_bit, u8 *gpio_val, | |||
1477 | /* call common vendor command request */ | 1477 | /* call common vendor command request */ |
1478 | status = cx231xx_send_vendor_cmd(dev, &ven_req); | 1478 | status = cx231xx_send_vendor_cmd(dev, &ven_req); |
1479 | if (status < 0) { | 1479 | if (status < 0) { |
1480 | cx231xx_info | 1480 | pr_info |
1481 | ("UsbInterface::sendCommand, failed with status -%d\n", | 1481 | ("UsbInterface::sendCommand, failed with status -%d\n", |
1482 | status); | 1482 | status); |
1483 | } | 1483 | } |
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c index 2ea69469e74b..a743865b40c0 100644 --- a/drivers/media/usb/cx231xx/cx231xx-dvb.c +++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c | |||
@@ -19,11 +19,11 @@ | |||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include "cx231xx.h" | ||
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
23 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
24 | #include <linux/usb.h> | 25 | #include <linux/usb.h> |
25 | 26 | ||
26 | #include "cx231xx.h" | ||
27 | #include <media/v4l2-common.h> | 27 | #include <media/v4l2-common.h> |
28 | #include <media/videobuf-vmalloc.h> | 28 | #include <media/videobuf-vmalloc.h> |
29 | 29 | ||
@@ -265,7 +265,7 @@ static int start_streaming(struct cx231xx_dvb *dvb) | |||
265 | struct cx231xx *dev = dvb->adapter.priv; | 265 | struct cx231xx *dev = dvb->adapter.priv; |
266 | 266 | ||
267 | if (dev->USE_ISO) { | 267 | if (dev->USE_ISO) { |
268 | cx231xx_info("DVB transfer mode is ISO.\n"); | 268 | pr_info("DVB transfer mode is ISO.\n"); |
269 | cx231xx_set_alt_setting(dev, INDEX_TS1, 4); | 269 | cx231xx_set_alt_setting(dev, INDEX_TS1, 4); |
270 | rc = cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE); | 270 | rc = cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE); |
271 | if (rc < 0) | 271 | if (rc < 0) |
@@ -276,7 +276,7 @@ static int start_streaming(struct cx231xx_dvb *dvb) | |||
276 | dev->ts1_mode.max_pkt_size, | 276 | dev->ts1_mode.max_pkt_size, |
277 | dvb_isoc_copy); | 277 | dvb_isoc_copy); |
278 | } else { | 278 | } else { |
279 | cx231xx_info("DVB transfer mode is BULK.\n"); | 279 | pr_info("DVB transfer mode is BULK.\n"); |
280 | cx231xx_set_alt_setting(dev, INDEX_TS1, 0); | 280 | cx231xx_set_alt_setting(dev, INDEX_TS1, 0); |
281 | rc = cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE); | 281 | rc = cx231xx_set_mode(dev, CX231XX_DIGITAL_MODE); |
282 | if (rc < 0) | 282 | if (rc < 0) |
@@ -430,15 +430,15 @@ int cx231xx_reset_analog_tuner(struct cx231xx *dev) | |||
430 | 430 | ||
431 | if (dops->init != NULL && !dev->xc_fw_load_done) { | 431 | if (dops->init != NULL && !dev->xc_fw_load_done) { |
432 | 432 | ||
433 | cx231xx_info("Reloading firmware for XC5000\n"); | 433 | pr_info("Reloading firmware for XC5000\n"); |
434 | status = dops->init(dev->dvb->frontend); | 434 | status = dops->init(dev->dvb->frontend); |
435 | if (status == 0) { | 435 | if (status == 0) { |
436 | dev->xc_fw_load_done = 1; | 436 | dev->xc_fw_load_done = 1; |
437 | cx231xx_info | 437 | pr_info |
438 | ("XC5000 firmware download completed\n"); | 438 | ("XC5000 firmware download completed\n"); |
439 | } else { | 439 | } else { |
440 | dev->xc_fw_load_done = 0; | 440 | dev->xc_fw_load_done = 0; |
441 | cx231xx_info | 441 | pr_info |
442 | ("XC5000 firmware download failed !!!\n"); | 442 | ("XC5000 firmware download failed !!!\n"); |
443 | } | 443 | } |
444 | } | 444 | } |
diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c index d1003c703fb5..d4a468a60bd0 100644 --- a/drivers/media/usb/cx231xx/cx231xx-i2c.c +++ b/drivers/media/usb/cx231xx/cx231xx-i2c.c | |||
@@ -20,6 +20,7 @@ | |||
20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include "cx231xx.h" | ||
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
25 | #include <linux/usb.h> | 26 | #include <linux/usb.h> |
@@ -28,7 +29,6 @@ | |||
28 | #include <media/v4l2-common.h> | 29 | #include <media/v4l2-common.h> |
29 | #include <media/tuner.h> | 30 | #include <media/tuner.h> |
30 | 31 | ||
31 | #include "cx231xx.h" | ||
32 | 32 | ||
33 | /* ----------------------------------------------------------- */ | 33 | /* ----------------------------------------------------------- */ |
34 | 34 | ||
@@ -498,17 +498,17 @@ void cx231xx_do_i2c_scan(struct cx231xx *dev, int i2c_port) | |||
498 | memset(&client, 0, sizeof(client)); | 498 | memset(&client, 0, sizeof(client)); |
499 | client.adapter = cx231xx_get_i2c_adap(dev, i2c_port); | 499 | client.adapter = cx231xx_get_i2c_adap(dev, i2c_port); |
500 | 500 | ||
501 | cx231xx_info(": Checking for I2C devices on port=%d ..\n", i2c_port); | 501 | pr_info(": Checking for I2C devices on port=%d ..\n", i2c_port); |
502 | for (i = 0; i < 128; i++) { | 502 | for (i = 0; i < 128; i++) { |
503 | client.addr = i; | 503 | client.addr = i; |
504 | rc = i2c_master_recv(&client, &buf, 0); | 504 | rc = i2c_master_recv(&client, &buf, 0); |
505 | if (rc < 0) | 505 | if (rc < 0) |
506 | continue; | 506 | continue; |
507 | cx231xx_info("%s: i2c scan: found device @ 0x%x [%s]\n", | 507 | pr_info("%s: i2c scan: found device @ 0x%x [%s]\n", |
508 | dev->name, i << 1, | 508 | dev->name, i << 1, |
509 | i2c_devs[i] ? i2c_devs[i] : "???"); | 509 | i2c_devs[i] ? i2c_devs[i] : "???"); |
510 | } | 510 | } |
511 | cx231xx_info(": Completed Checking for I2C devices on port=%d.\n", | 511 | pr_info(": Completed Checking for I2C devices on port=%d.\n", |
512 | i2c_port); | 512 | i2c_port); |
513 | } | 513 | } |
514 | 514 | ||
@@ -532,7 +532,7 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus) | |||
532 | i2c_add_adapter(&bus->i2c_adap); | 532 | i2c_add_adapter(&bus->i2c_adap); |
533 | 533 | ||
534 | if (0 != bus->i2c_rc) | 534 | if (0 != bus->i2c_rc) |
535 | cx231xx_warn("%s: i2c bus %d register FAILED\n", | 535 | pr_warn("%s: i2c bus %d register FAILED\n", |
536 | dev->name, bus->nr); | 536 | dev->name, bus->nr); |
537 | 537 | ||
538 | return bus->i2c_rc; | 538 | return bus->i2c_rc; |
@@ -576,7 +576,7 @@ int cx231xx_i2c_mux_register(struct cx231xx *dev, int mux_no) | |||
576 | NULL); | 576 | NULL); |
577 | 577 | ||
578 | if (!dev->i2c_mux_adap[mux_no]) | 578 | if (!dev->i2c_mux_adap[mux_no]) |
579 | cx231xx_warn("%s: i2c mux %d register FAILED\n", | 579 | pr_warn("%s: i2c mux %d register FAILED\n", |
580 | dev->name, mux_no); | 580 | dev->name, mux_no); |
581 | 581 | ||
582 | return 0; | 582 | return 0; |
diff --git a/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c b/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c index 3052c4c20229..4666e533fe0a 100644 --- a/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c +++ b/drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c | |||
@@ -703,8 +703,8 @@ int initialize_cx231xx(struct cx231xx *dev) | |||
703 | _current_scenario_idx = INDEX_BUSPOWER_DIF_ONLY; | 703 | _current_scenario_idx = INDEX_BUSPOWER_DIF_ONLY; |
704 | break; | 704 | break; |
705 | default: | 705 | default: |
706 | cx231xx_info("bad config in buspower!!!!\n"); | 706 | pr_info("bad config in buspower!!!!\n"); |
707 | cx231xx_info("config_info=%x\n", | 707 | pr_info("config_info=%x\n", |
708 | (config_info & BUSPOWER_MASK)); | 708 | (config_info & BUSPOWER_MASK)); |
709 | return 1; | 709 | return 1; |
710 | } | 710 | } |
@@ -768,8 +768,8 @@ int initialize_cx231xx(struct cx231xx *dev) | |||
768 | _current_scenario_idx = INDEX_SELFPOWER_COMPRESSOR; | 768 | _current_scenario_idx = INDEX_SELFPOWER_COMPRESSOR; |
769 | break; | 769 | break; |
770 | default: | 770 | default: |
771 | cx231xx_info("bad senario!!!!!\n"); | 771 | pr_info("bad senario!!!!!\n"); |
772 | cx231xx_info("config_info=%x\n", | 772 | pr_info("config_info=%x\n", |
773 | (config_info & SELFPOWER_MASK)); | 773 | (config_info & SELFPOWER_MASK)); |
774 | return -ENODEV; | 774 | return -ENODEV; |
775 | } | 775 | } |
@@ -781,17 +781,17 @@ int initialize_cx231xx(struct cx231xx *dev) | |||
781 | sizeof(struct pcb_config)); | 781 | sizeof(struct pcb_config)); |
782 | 782 | ||
783 | if (pcb_debug) { | 783 | if (pcb_debug) { |
784 | cx231xx_info("SC(0x00) register = 0x%x\n", config_info); | 784 | pr_info("SC(0x00) register = 0x%x\n", config_info); |
785 | cx231xx_info("scenario %d\n", | 785 | pr_info("scenario %d\n", |
786 | (dev->current_pcb_config.index) + 1); | 786 | (dev->current_pcb_config.index) + 1); |
787 | cx231xx_info("type=%x\n", dev->current_pcb_config.type); | 787 | pr_info("type=%x\n", dev->current_pcb_config.type); |
788 | cx231xx_info("mode=%x\n", dev->current_pcb_config.mode); | 788 | pr_info("mode=%x\n", dev->current_pcb_config.mode); |
789 | cx231xx_info("speed=%x\n", dev->current_pcb_config.speed); | 789 | pr_info("speed=%x\n", dev->current_pcb_config.speed); |
790 | cx231xx_info("ts1_source=%x\n", | 790 | pr_info("ts1_source=%x\n", |
791 | dev->current_pcb_config.ts1_source); | 791 | dev->current_pcb_config.ts1_source); |
792 | cx231xx_info("ts2_source=%x\n", | 792 | pr_info("ts2_source=%x\n", |
793 | dev->current_pcb_config.ts2_source); | 793 | dev->current_pcb_config.ts2_source); |
794 | cx231xx_info("analog_source=%x\n", | 794 | pr_info("analog_source=%x\n", |
795 | dev->current_pcb_config.analog_source); | 795 | dev->current_pcb_config.analog_source); |
796 | } | 796 | } |
797 | 797 | ||
diff --git a/drivers/media/usb/cx231xx/cx231xx-vbi.c b/drivers/media/usb/cx231xx/cx231xx-vbi.c index c02794274f51..f80126d3525a 100644 --- a/drivers/media/usb/cx231xx/cx231xx-vbi.c +++ b/drivers/media/usb/cx231xx/cx231xx-vbi.c | |||
@@ -19,6 +19,7 @@ | |||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include "cx231xx.h" | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/list.h> | 24 | #include <linux/list.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
@@ -35,7 +36,6 @@ | |||
35 | #include <media/msp3400.h> | 36 | #include <media/msp3400.h> |
36 | #include <media/tuner.h> | 37 | #include <media/tuner.h> |
37 | 38 | ||
38 | #include "cx231xx.h" | ||
39 | #include "cx231xx-vbi.h" | 39 | #include "cx231xx-vbi.h" |
40 | 40 | ||
41 | static inline void print_err_status(struct cx231xx *dev, int packet, int status) | 41 | static inline void print_err_status(struct cx231xx *dev, int packet, int status) |
@@ -69,10 +69,10 @@ static inline void print_err_status(struct cx231xx *dev, int packet, int status) | |||
69 | break; | 69 | break; |
70 | } | 70 | } |
71 | if (packet < 0) { | 71 | if (packet < 0) { |
72 | cx231xx_err("URB status %d [%s].\n", status, | 72 | pr_err("URB status %d [%s].\n", status, |
73 | errmsg); | 73 | errmsg); |
74 | } else { | 74 | } else { |
75 | cx231xx_err("URB packet %d, status %d [%s].\n", | 75 | pr_err("URB packet %d, status %d [%s].\n", |
76 | packet, status, errmsg); | 76 | packet, status, errmsg); |
77 | } | 77 | } |
78 | } | 78 | } |
@@ -316,7 +316,7 @@ static void cx231xx_irq_vbi_callback(struct urb *urb) | |||
316 | case -ESHUTDOWN: | 316 | case -ESHUTDOWN: |
317 | return; | 317 | return; |
318 | default: /* error */ | 318 | default: /* error */ |
319 | cx231xx_err("urb completition error %d.\n", | 319 | pr_err("urb completition error %d.\n", |
320 | urb->status); | 320 | urb->status); |
321 | break; | 321 | break; |
322 | } | 322 | } |
@@ -331,7 +331,7 @@ static void cx231xx_irq_vbi_callback(struct urb *urb) | |||
331 | 331 | ||
332 | urb->status = usb_submit_urb(urb, GFP_ATOMIC); | 332 | urb->status = usb_submit_urb(urb, GFP_ATOMIC); |
333 | if (urb->status) { | 333 | if (urb->status) { |
334 | cx231xx_err("urb resubmit failed (error=%i)\n", | 334 | pr_err("urb resubmit failed (error=%i)\n", |
335 | urb->status); | 335 | urb->status); |
336 | } | 336 | } |
337 | } | 337 | } |
@@ -344,7 +344,7 @@ void cx231xx_uninit_vbi_isoc(struct cx231xx *dev) | |||
344 | struct urb *urb; | 344 | struct urb *urb; |
345 | int i; | 345 | int i; |
346 | 346 | ||
347 | cx231xx_info("called cx231xx_uninit_vbi_isoc\n"); | 347 | pr_info("called cx231xx_uninit_vbi_isoc\n"); |
348 | 348 | ||
349 | dev->vbi_mode.bulk_ctl.nfields = -1; | 349 | dev->vbi_mode.bulk_ctl.nfields = -1; |
350 | for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) { | 350 | for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) { |
@@ -393,7 +393,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
393 | struct urb *urb; | 393 | struct urb *urb; |
394 | int rc; | 394 | int rc; |
395 | 395 | ||
396 | cx231xx_info("called cx231xx_vbi_isoc\n"); | 396 | pr_info("called cx231xx_vbi_isoc\n"); |
397 | 397 | ||
398 | /* De-allocates all pending stuff */ | 398 | /* De-allocates all pending stuff */ |
399 | cx231xx_uninit_vbi_isoc(dev); | 399 | cx231xx_uninit_vbi_isoc(dev); |
@@ -419,14 +419,14 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
419 | dev->vbi_mode.bulk_ctl.urb = kzalloc(sizeof(void *) * num_bufs, | 419 | dev->vbi_mode.bulk_ctl.urb = kzalloc(sizeof(void *) * num_bufs, |
420 | GFP_KERNEL); | 420 | GFP_KERNEL); |
421 | if (!dev->vbi_mode.bulk_ctl.urb) { | 421 | if (!dev->vbi_mode.bulk_ctl.urb) { |
422 | cx231xx_errdev("cannot alloc memory for usb buffers\n"); | 422 | pr_err("cannot alloc memory for usb buffers\n"); |
423 | return -ENOMEM; | 423 | return -ENOMEM; |
424 | } | 424 | } |
425 | 425 | ||
426 | dev->vbi_mode.bulk_ctl.transfer_buffer = | 426 | dev->vbi_mode.bulk_ctl.transfer_buffer = |
427 | kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL); | 427 | kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL); |
428 | if (!dev->vbi_mode.bulk_ctl.transfer_buffer) { | 428 | if (!dev->vbi_mode.bulk_ctl.transfer_buffer) { |
429 | cx231xx_errdev("cannot allocate memory for usbtransfer\n"); | 429 | pr_err("cannot allocate memory for usbtransfer\n"); |
430 | kfree(dev->vbi_mode.bulk_ctl.urb); | 430 | kfree(dev->vbi_mode.bulk_ctl.urb); |
431 | return -ENOMEM; | 431 | return -ENOMEM; |
432 | } | 432 | } |
@@ -441,7 +441,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
441 | 441 | ||
442 | urb = usb_alloc_urb(0, GFP_KERNEL); | 442 | urb = usb_alloc_urb(0, GFP_KERNEL); |
443 | if (!urb) { | 443 | if (!urb) { |
444 | cx231xx_err("cannot alloc bulk_ctl.urb %i\n", i); | 444 | pr_err("cannot alloc bulk_ctl.urb %i\n", i); |
445 | cx231xx_uninit_vbi_isoc(dev); | 445 | cx231xx_uninit_vbi_isoc(dev); |
446 | return -ENOMEM; | 446 | return -ENOMEM; |
447 | } | 447 | } |
@@ -451,7 +451,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
451 | dev->vbi_mode.bulk_ctl.transfer_buffer[i] = | 451 | dev->vbi_mode.bulk_ctl.transfer_buffer[i] = |
452 | kzalloc(sb_size, GFP_KERNEL); | 452 | kzalloc(sb_size, GFP_KERNEL); |
453 | if (!dev->vbi_mode.bulk_ctl.transfer_buffer[i]) { | 453 | if (!dev->vbi_mode.bulk_ctl.transfer_buffer[i]) { |
454 | cx231xx_err("unable to allocate %i bytes for transfer" | 454 | pr_err("unable to allocate %i bytes for transfer" |
455 | " buffer %i%s\n", sb_size, i, | 455 | " buffer %i%s\n", sb_size, i, |
456 | in_interrupt() ? " while in int" : ""); | 456 | in_interrupt() ? " while in int" : ""); |
457 | cx231xx_uninit_vbi_isoc(dev); | 457 | cx231xx_uninit_vbi_isoc(dev); |
@@ -470,7 +470,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
470 | for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) { | 470 | for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) { |
471 | rc = usb_submit_urb(dev->vbi_mode.bulk_ctl.urb[i], GFP_ATOMIC); | 471 | rc = usb_submit_urb(dev->vbi_mode.bulk_ctl.urb[i], GFP_ATOMIC); |
472 | if (rc) { | 472 | if (rc) { |
473 | cx231xx_err("submit of urb %i failed (error=%i)\n", i, | 473 | pr_err("submit of urb %i failed (error=%i)\n", i, |
474 | rc); | 474 | rc); |
475 | cx231xx_uninit_vbi_isoc(dev); | 475 | cx231xx_uninit_vbi_isoc(dev); |
476 | return rc; | 476 | return rc; |
@@ -522,7 +522,7 @@ static inline void vbi_buffer_filled(struct cx231xx *dev, | |||
522 | struct cx231xx_buffer *buf) | 522 | struct cx231xx_buffer *buf) |
523 | { | 523 | { |
524 | /* Advice that buffer was filled */ | 524 | /* Advice that buffer was filled */ |
525 | /* cx231xx_info("[%p/%d] wakeup\n", buf, buf->vb.i); */ | 525 | /* pr_info("[%p/%d] wakeup\n", buf, buf->vb.i); */ |
526 | 526 | ||
527 | buf->vb.state = VIDEOBUF_DONE; | 527 | buf->vb.state = VIDEOBUF_DONE; |
528 | buf->vb.field_count++; | 528 | buf->vb.field_count++; |
@@ -614,7 +614,7 @@ static inline void get_next_vbi_buf(struct cx231xx_dmaqueue *dma_q, | |||
614 | char *outp; | 614 | char *outp; |
615 | 615 | ||
616 | if (list_empty(&dma_q->active)) { | 616 | if (list_empty(&dma_q->active)) { |
617 | cx231xx_err("No active queue to serve\n"); | 617 | pr_err("No active queue to serve\n"); |
618 | dev->vbi_mode.bulk_ctl.buf = NULL; | 618 | dev->vbi_mode.bulk_ctl.buf = NULL; |
619 | *buf = NULL; | 619 | *buf = NULL; |
620 | return; | 620 | return; |
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index 3b3ada6562ca..bda5597b5eff 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c | |||
@@ -22,6 +22,7 @@ | |||
22 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "cx231xx.h" | ||
25 | #include <linux/init.h> | 26 | #include <linux/init.h> |
26 | #include <linux/list.h> | 27 | #include <linux/list.h> |
27 | #include <linux/module.h> | 28 | #include <linux/module.h> |
@@ -41,7 +42,6 @@ | |||
41 | 42 | ||
42 | #include "dvb_frontend.h" | 43 | #include "dvb_frontend.h" |
43 | 44 | ||
44 | #include "cx231xx.h" | ||
45 | #include "cx231xx-vbi.h" | 45 | #include "cx231xx-vbi.h" |
46 | 46 | ||
47 | #define CX231XX_VERSION "0.0.2" | 47 | #define CX231XX_VERSION "0.0.2" |
@@ -737,7 +737,7 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, | |||
737 | if (!dev->video_mode.bulk_ctl.num_bufs) | 737 | if (!dev->video_mode.bulk_ctl.num_bufs) |
738 | urb_init = 1; | 738 | urb_init = 1; |
739 | } | 739 | } |
740 | /*cx231xx_info("urb_init=%d dev->video_mode.max_pkt_size=%d\n", | 740 | /*pr_info("urb_init=%d dev->video_mode.max_pkt_size=%d\n", |
741 | urb_init, dev->video_mode.max_pkt_size);*/ | 741 | urb_init, dev->video_mode.max_pkt_size);*/ |
742 | if (urb_init) { | 742 | if (urb_init) { |
743 | dev->mode_tv = 0; | 743 | dev->mode_tv = 0; |
@@ -809,7 +809,7 @@ void video_mux(struct cx231xx *dev, int index) | |||
809 | 809 | ||
810 | cx231xx_set_audio_input(dev, dev->ctl_ainput); | 810 | cx231xx_set_audio_input(dev, dev->ctl_ainput); |
811 | 811 | ||
812 | cx231xx_info("video_mux : %d\n", index); | 812 | pr_info("video_mux : %d\n", index); |
813 | 813 | ||
814 | /* do mode control overrides if required */ | 814 | /* do mode control overrides if required */ |
815 | cx231xx_do_mode_ctrl_overrides(dev); | 815 | cx231xx_do_mode_ctrl_overrides(dev); |
@@ -861,7 +861,7 @@ static void res_free(struct cx231xx_fh *fh) | |||
861 | static int check_dev(struct cx231xx *dev) | 861 | static int check_dev(struct cx231xx *dev) |
862 | { | 862 | { |
863 | if (dev->state & DEV_DISCONNECTED) { | 863 | if (dev->state & DEV_DISCONNECTED) { |
864 | cx231xx_errdev("v4l2 ioctl: device not present\n"); | 864 | pr_err("v4l2 ioctl: device not present\n"); |
865 | return -ENODEV; | 865 | return -ENODEV; |
866 | } | 866 | } |
867 | return 0; | 867 | return 0; |
@@ -953,12 +953,12 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, | |||
953 | return -EINVAL; | 953 | return -EINVAL; |
954 | 954 | ||
955 | if (videobuf_queue_is_busy(&fh->vb_vidq)) { | 955 | if (videobuf_queue_is_busy(&fh->vb_vidq)) { |
956 | cx231xx_errdev("%s queue busy\n", __func__); | 956 | pr_err("%s queue busy\n", __func__); |
957 | return -EBUSY; | 957 | return -EBUSY; |
958 | } | 958 | } |
959 | 959 | ||
960 | if (dev->stream_on && !fh->stream_on) { | 960 | if (dev->stream_on && !fh->stream_on) { |
961 | cx231xx_errdev("%s device in use by another fh\n", __func__); | 961 | pr_err("%s device in use by another fh\n", __func__); |
962 | return -EBUSY; | 962 | return -EBUSY; |
963 | } | 963 | } |
964 | 964 | ||
@@ -1176,9 +1176,9 @@ int cx231xx_s_frequency(struct file *file, void *priv, | |||
1176 | int rc; | 1176 | int rc; |
1177 | u32 if_frequency = 5400000; | 1177 | u32 if_frequency = 5400000; |
1178 | 1178 | ||
1179 | cx231xx_info("Enter vidioc_s_frequency()f->frequency=%d;f->type=%d\n", | 1179 | pr_info("Enter vidioc_s_frequency()f->frequency=%d;f->type=%d\n", |
1180 | f->frequency, f->type); | 1180 | f->frequency, f->type); |
1181 | /*cx231xx_info("f->type: 1-radio 2-analogTV 3-digitalTV\n");*/ | 1181 | /*pr_info("f->type: 1-radio 2-analogTV 3-digitalTV\n");*/ |
1182 | 1182 | ||
1183 | rc = check_dev(dev); | 1183 | rc = check_dev(dev); |
1184 | if (rc < 0) | 1184 | if (rc < 0) |
@@ -1213,13 +1213,13 @@ int cx231xx_s_frequency(struct file *file, void *priv, | |||
1213 | else if (dev->norm & V4L2_STD_SECAM_LC) | 1213 | else if (dev->norm & V4L2_STD_SECAM_LC) |
1214 | if_frequency = 1250000; /*1.25MHz */ | 1214 | if_frequency = 1250000; /*1.25MHz */ |
1215 | 1215 | ||
1216 | cx231xx_info("if_frequency is set to %d\n", if_frequency); | 1216 | pr_info("if_frequency is set to %d\n", if_frequency); |
1217 | cx231xx_set_Colibri_For_LowIF(dev, if_frequency, 1, 1); | 1217 | cx231xx_set_Colibri_For_LowIF(dev, if_frequency, 1, 1); |
1218 | 1218 | ||
1219 | update_HH_register_after_set_DIF(dev); | 1219 | update_HH_register_after_set_DIF(dev); |
1220 | } | 1220 | } |
1221 | 1221 | ||
1222 | cx231xx_info("Set New FREQUENCY to %d\n", f->frequency); | 1222 | pr_info("Set New FREQUENCY to %d\n", f->frequency); |
1223 | 1223 | ||
1224 | return rc; | 1224 | return rc; |
1225 | } | 1225 | } |
@@ -1523,7 +1523,7 @@ static int vidioc_s_fmt_vbi_cap(struct file *file, void *priv, | |||
1523 | struct cx231xx *dev = fh->dev; | 1523 | struct cx231xx *dev = fh->dev; |
1524 | 1524 | ||
1525 | if (dev->vbi_stream_on && !fh->stream_on) { | 1525 | if (dev->vbi_stream_on && !fh->stream_on) { |
1526 | cx231xx_errdev("%s device in use by another fh\n", __func__); | 1526 | pr_err("%s device in use by another fh\n", __func__); |
1527 | return -EBUSY; | 1527 | return -EBUSY; |
1528 | } | 1528 | } |
1529 | return vidioc_try_fmt_vbi_cap(file, priv, f); | 1529 | return vidioc_try_fmt_vbi_cap(file, priv, f); |
@@ -1642,7 +1642,7 @@ static int cx231xx_v4l2_open(struct file *filp) | |||
1642 | #if 0 | 1642 | #if 0 |
1643 | errCode = cx231xx_set_mode(dev, CX231XX_ANALOG_MODE); | 1643 | errCode = cx231xx_set_mode(dev, CX231XX_ANALOG_MODE); |
1644 | if (errCode < 0) { | 1644 | if (errCode < 0) { |
1645 | cx231xx_errdev | 1645 | pr_err |
1646 | ("Device locked on digital mode. Can't open analog\n"); | 1646 | ("Device locked on digital mode. Can't open analog\n"); |
1647 | return -EBUSY; | 1647 | return -EBUSY; |
1648 | } | 1648 | } |
@@ -1650,7 +1650,7 @@ static int cx231xx_v4l2_open(struct file *filp) | |||
1650 | 1650 | ||
1651 | fh = kzalloc(sizeof(struct cx231xx_fh), GFP_KERNEL); | 1651 | fh = kzalloc(sizeof(struct cx231xx_fh), GFP_KERNEL); |
1652 | if (!fh) { | 1652 | if (!fh) { |
1653 | cx231xx_errdev("cx231xx-video.c: Out of memory?!\n"); | 1653 | pr_err("cx231xx-video.c: Out of memory?!\n"); |
1654 | return -ENOMEM; | 1654 | return -ENOMEM; |
1655 | } | 1655 | } |
1656 | if (mutex_lock_interruptible(&dev->lock)) { | 1656 | if (mutex_lock_interruptible(&dev->lock)) { |
@@ -1736,7 +1736,7 @@ void cx231xx_release_analog_resources(struct cx231xx *dev) | |||
1736 | dev->radio_dev = NULL; | 1736 | dev->radio_dev = NULL; |
1737 | } | 1737 | } |
1738 | if (dev->vbi_dev) { | 1738 | if (dev->vbi_dev) { |
1739 | cx231xx_info("V4L2 device %s deregistered\n", | 1739 | pr_info("V4L2 device %s deregistered\n", |
1740 | video_device_node_name(dev->vbi_dev)); | 1740 | video_device_node_name(dev->vbi_dev)); |
1741 | if (video_is_registered(dev->vbi_dev)) | 1741 | if (video_is_registered(dev->vbi_dev)) |
1742 | video_unregister_device(dev->vbi_dev); | 1742 | video_unregister_device(dev->vbi_dev); |
@@ -1745,7 +1745,7 @@ void cx231xx_release_analog_resources(struct cx231xx *dev) | |||
1745 | dev->vbi_dev = NULL; | 1745 | dev->vbi_dev = NULL; |
1746 | } | 1746 | } |
1747 | if (dev->vdev) { | 1747 | if (dev->vdev) { |
1748 | cx231xx_info("V4L2 device %s deregistered\n", | 1748 | pr_info("V4L2 device %s deregistered\n", |
1749 | video_device_node_name(dev->vdev)); | 1749 | video_device_node_name(dev->vdev)); |
1750 | 1750 | ||
1751 | if (dev->board.has_417) | 1751 | if (dev->board.has_417) |
@@ -2080,7 +2080,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) | |||
2080 | { | 2080 | { |
2081 | int ret; | 2081 | int ret; |
2082 | 2082 | ||
2083 | cx231xx_info("%s: v4l2 driver version %s\n", | 2083 | pr_info("%s: v4l2 driver version %s\n", |
2084 | dev->name, CX231XX_VERSION); | 2084 | dev->name, CX231XX_VERSION); |
2085 | 2085 | ||
2086 | /* set default norm */ | 2086 | /* set default norm */ |
@@ -2119,7 +2119,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) | |||
2119 | /* allocate and fill video video_device struct */ | 2119 | /* allocate and fill video video_device struct */ |
2120 | dev->vdev = cx231xx_vdev_init(dev, &cx231xx_video_template, "video"); | 2120 | dev->vdev = cx231xx_vdev_init(dev, &cx231xx_video_template, "video"); |
2121 | if (!dev->vdev) { | 2121 | if (!dev->vdev) { |
2122 | cx231xx_errdev("cannot allocate video_device.\n"); | 2122 | pr_err("cannot allocate video_device.\n"); |
2123 | return -ENODEV; | 2123 | return -ENODEV; |
2124 | } | 2124 | } |
2125 | 2125 | ||
@@ -2128,12 +2128,12 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) | |||
2128 | ret = video_register_device(dev->vdev, VFL_TYPE_GRABBER, | 2128 | ret = video_register_device(dev->vdev, VFL_TYPE_GRABBER, |
2129 | video_nr[dev->devno]); | 2129 | video_nr[dev->devno]); |
2130 | if (ret) { | 2130 | if (ret) { |
2131 | cx231xx_errdev("unable to register video device (error=%i).\n", | 2131 | pr_err("unable to register video device (error=%i).\n", |
2132 | ret); | 2132 | ret); |
2133 | return ret; | 2133 | return ret; |
2134 | } | 2134 | } |
2135 | 2135 | ||
2136 | cx231xx_info("%s/0: registered device %s [v4l2]\n", | 2136 | pr_info("%s/0: registered device %s [v4l2]\n", |
2137 | dev->name, video_device_node_name(dev->vdev)); | 2137 | dev->name, video_device_node_name(dev->vdev)); |
2138 | 2138 | ||
2139 | /* Initialize VBI template */ | 2139 | /* Initialize VBI template */ |
@@ -2144,7 +2144,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) | |||
2144 | dev->vbi_dev = cx231xx_vdev_init(dev, &cx231xx_vbi_template, "vbi"); | 2144 | dev->vbi_dev = cx231xx_vdev_init(dev, &cx231xx_vbi_template, "vbi"); |
2145 | 2145 | ||
2146 | if (!dev->vbi_dev) { | 2146 | if (!dev->vbi_dev) { |
2147 | cx231xx_errdev("cannot allocate video_device.\n"); | 2147 | pr_err("cannot allocate video_device.\n"); |
2148 | return -ENODEV; | 2148 | return -ENODEV; |
2149 | } | 2149 | } |
2150 | dev->vbi_dev->ctrl_handler = &dev->ctrl_handler; | 2150 | dev->vbi_dev->ctrl_handler = &dev->ctrl_handler; |
@@ -2152,32 +2152,32 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) | |||
2152 | ret = video_register_device(dev->vbi_dev, VFL_TYPE_VBI, | 2152 | ret = video_register_device(dev->vbi_dev, VFL_TYPE_VBI, |
2153 | vbi_nr[dev->devno]); | 2153 | vbi_nr[dev->devno]); |
2154 | if (ret < 0) { | 2154 | if (ret < 0) { |
2155 | cx231xx_errdev("unable to register vbi device\n"); | 2155 | pr_err("unable to register vbi device\n"); |
2156 | return ret; | 2156 | return ret; |
2157 | } | 2157 | } |
2158 | 2158 | ||
2159 | cx231xx_info("%s/0: registered device %s\n", | 2159 | pr_info("%s/0: registered device %s\n", |
2160 | dev->name, video_device_node_name(dev->vbi_dev)); | 2160 | dev->name, video_device_node_name(dev->vbi_dev)); |
2161 | 2161 | ||
2162 | if (cx231xx_boards[dev->model].radio.type == CX231XX_RADIO) { | 2162 | if (cx231xx_boards[dev->model].radio.type == CX231XX_RADIO) { |
2163 | dev->radio_dev = cx231xx_vdev_init(dev, &cx231xx_radio_template, | 2163 | dev->radio_dev = cx231xx_vdev_init(dev, &cx231xx_radio_template, |
2164 | "radio"); | 2164 | "radio"); |
2165 | if (!dev->radio_dev) { | 2165 | if (!dev->radio_dev) { |
2166 | cx231xx_errdev("cannot allocate video_device.\n"); | 2166 | pr_err("cannot allocate video_device.\n"); |
2167 | return -ENODEV; | 2167 | return -ENODEV; |
2168 | } | 2168 | } |
2169 | dev->radio_dev->ctrl_handler = &dev->radio_ctrl_handler; | 2169 | dev->radio_dev->ctrl_handler = &dev->radio_ctrl_handler; |
2170 | ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO, | 2170 | ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO, |
2171 | radio_nr[dev->devno]); | 2171 | radio_nr[dev->devno]); |
2172 | if (ret < 0) { | 2172 | if (ret < 0) { |
2173 | cx231xx_errdev("can't register radio device\n"); | 2173 | pr_err("can't register radio device\n"); |
2174 | return ret; | 2174 | return ret; |
2175 | } | 2175 | } |
2176 | cx231xx_info("Registered radio device as %s\n", | 2176 | pr_info("Registered radio device as %s\n", |
2177 | video_device_node_name(dev->radio_dev)); | 2177 | video_device_node_name(dev->radio_dev)); |
2178 | } | 2178 | } |
2179 | 2179 | ||
2180 | cx231xx_info("V4L2 device registered as %s and %s\n", | 2180 | pr_info("V4L2 device registered as %s and %s\n", |
2181 | video_device_node_name(dev->vdev), | 2181 | video_device_node_name(dev->vdev), |
2182 | video_device_node_name(dev->vbi_dev)); | 2182 | video_device_node_name(dev->vbi_dev)); |
2183 | 2183 | ||
diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h index a0ec24176522..fa27e0c2accb 100644 --- a/drivers/media/usb/cx231xx/cx231xx.h +++ b/drivers/media/usb/cx231xx/cx231xx.h | |||
@@ -22,6 +22,8 @@ | |||
22 | #ifndef _CX231XX_H | 22 | #ifndef _CX231XX_H |
23 | #define _CX231XX_H | 23 | #define _CX231XX_H |
24 | 24 | ||
25 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
26 | |||
25 | #include <linux/videodev2.h> | 27 | #include <linux/videodev2.h> |
26 | #include <linux/types.h> | 28 | #include <linux/types.h> |
27 | #include <linux/ioctl.h> | 29 | #include <linux/ioctl.h> |
@@ -981,23 +983,6 @@ void cx231xx_ir_exit(struct cx231xx *dev); | |||
981 | #define cx231xx_ir_exit(dev) (0) | 983 | #define cx231xx_ir_exit(dev) (0) |
982 | #endif | 984 | #endif |
983 | 985 | ||
984 | |||
985 | /* printk macros */ | ||
986 | |||
987 | #define cx231xx_err(fmt, arg...) do {\ | ||
988 | printk(KERN_ERR fmt , ##arg); } while (0) | ||
989 | |||
990 | #define cx231xx_errdev(fmt, arg...) do {\ | ||
991 | printk(KERN_ERR "%s: "fmt,\ | ||
992 | dev->name , ##arg); } while (0) | ||
993 | |||
994 | #define cx231xx_info(fmt, arg...) do {\ | ||
995 | printk(KERN_INFO "%s: "fmt,\ | ||
996 | dev->name , ##arg); } while (0) | ||
997 | #define cx231xx_warn(fmt, arg...) do {\ | ||
998 | printk(KERN_WARNING "%s: "fmt,\ | ||
999 | dev->name , ##arg); } while (0) | ||
1000 | |||
1001 | static inline unsigned int norm_maxw(struct cx231xx *dev) | 986 | static inline unsigned int norm_maxw(struct cx231xx *dev) |
1002 | { | 987 | { |
1003 | if (dev->board.max_range_640_480) | 988 | if (dev->board.max_range_640_480) |