aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPete Eberlein <pete@sensoray.com>2009-09-18 22:06:15 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-18 23:54:11 -0400
commit62474076c533ee4f35aee08656ce57d224f533d4 (patch)
tree1fddf05234622ffb3b843fe8fb1563c0aa0de8f1 /drivers
parent047efc7db9fea32703e8ba04629562e52cccdf88 (diff)
V4L/DVB (13027): go7007: convert printks to v4l2_info
Use v4l2_info and v4l2_err where appropriate. Signed-off-by: Pete Eberlein <pete@sensoray.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/go7007/go7007-driver.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/staging/go7007/go7007-driver.c b/drivers/staging/go7007/go7007-driver.c
index 359a34f67597..472f4bb08fdc 100644
--- a/drivers/staging/go7007/go7007-driver.c
+++ b/drivers/staging/go7007/go7007-driver.c
@@ -49,7 +49,7 @@ int go7007_read_interrupt(struct go7007 *go, u16 *value, u16 *data)
49 go->hpi_ops->read_interrupt(go); 49 go->hpi_ops->read_interrupt(go);
50 if (wait_event_timeout(go->interrupt_waitq, 50 if (wait_event_timeout(go->interrupt_waitq,
51 go->interrupt_available, 5*HZ) < 0) { 51 go->interrupt_available, 5*HZ) < 0) {
52 printk(KERN_ERR "go7007: timeout waiting for read interrupt\n"); 52 v4l2_err(go->video_dev, "timeout waiting for read interrupt\n");
53 return -1; 53 return -1;
54 } 54 }
55 if (!go->interrupt_available) 55 if (!go->interrupt_available)
@@ -97,13 +97,12 @@ static int go7007_load_encoder(struct go7007 *go)
97 u16 intr_val, intr_data; 97 u16 intr_val, intr_data;
98 98
99 if (request_firmware(&fw_entry, fw_name, go->dev)) { 99 if (request_firmware(&fw_entry, fw_name, go->dev)) {
100 printk(KERN_ERR 100 v4l2_err(go, "unable to load firmware from file "
101 "go7007: unable to load firmware from file \"%s\"\n", 101 "\"%s\"\n", fw_name);
102 fw_name);
103 return -1; 102 return -1;
104 } 103 }
105 if (fw_entry->size < 16 || memcmp(fw_entry->data, "WISGO7007FW", 11)) { 104 if (fw_entry->size < 16 || memcmp(fw_entry->data, "WISGO7007FW", 11)) {
106 printk(KERN_ERR "go7007: file \"%s\" does not appear to be " 105 v4l2_err(go, "file \"%s\" does not appear to be "
107 "go7007 firmware\n", fw_name); 106 "go7007 firmware\n", fw_name);
108 release_firmware(fw_entry); 107 release_firmware(fw_entry);
109 return -1; 108 return -1;
@@ -111,7 +110,7 @@ static int go7007_load_encoder(struct go7007 *go)
111 fw_len = fw_entry->size - 16; 110 fw_len = fw_entry->size - 16;
112 bounce = kmalloc(fw_len, GFP_KERNEL); 111 bounce = kmalloc(fw_len, GFP_KERNEL);
113 if (bounce == NULL) { 112 if (bounce == NULL) {
114 printk(KERN_ERR "go7007: unable to allocate %d bytes for " 113 v4l2_err(go, "unable to allocate %d bytes for "
115 "firmware transfer\n", fw_len); 114 "firmware transfer\n", fw_len);
116 release_firmware(fw_entry); 115 release_firmware(fw_entry);
117 return -1; 116 return -1;
@@ -122,7 +121,7 @@ static int go7007_load_encoder(struct go7007 *go)
122 go7007_send_firmware(go, bounce, fw_len) < 0 || 121 go7007_send_firmware(go, bounce, fw_len) < 0 ||
123 go7007_read_interrupt(go, &intr_val, &intr_data) < 0 || 122 go7007_read_interrupt(go, &intr_val, &intr_data) < 0 ||
124 (intr_val & ~0x1) != 0x5a5a) { 123 (intr_val & ~0x1) != 0x5a5a) {
125 printk(KERN_ERR "go7007: error transferring firmware\n"); 124 v4l2_err(go, "error transferring firmware\n");
126 rv = -1; 125 rv = -1;
127 } 126 }
128 kfree(bounce); 127 kfree(bounce);
@@ -316,7 +315,7 @@ int go7007_start_encoder(struct go7007 *go)
316 315
317 if (go7007_send_firmware(go, fw, fw_len) < 0 || 316 if (go7007_send_firmware(go, fw, fw_len) < 0 ||
318 go7007_read_interrupt(go, &intr_val, &intr_data) < 0) { 317 go7007_read_interrupt(go, &intr_val, &intr_data) < 0) {
319 printk(KERN_ERR "go7007: error transferring firmware\n"); 318 v4l2_err(go->video_dev, "error transferring firmware\n");
320 rv = -1; 319 rv = -1;
321 goto start_error; 320 goto start_error;
322 } 321 }
@@ -325,7 +324,7 @@ int go7007_start_encoder(struct go7007 *go)
325 go->parse_length = 0; 324 go->parse_length = 0;
326 go->seen_frame = 0; 325 go->seen_frame = 0;
327 if (go7007_stream_start(go) < 0) { 326 if (go7007_stream_start(go) < 0) {
328 printk(KERN_ERR "go7007: error starting stream transfer\n"); 327 v4l2_err(go->video_dev, "error starting stream transfer\n");
329 rv = -1; 328 rv = -1;
330 goto start_error; 329 goto start_error;
331 } 330 }
@@ -421,7 +420,7 @@ void go7007_parse_video_stream(struct go7007 *go, u8 *buf, int length)
421 for (i = 0; i < length; ++i) { 420 for (i = 0; i < length; ++i) {
422 if (go->active_buf != NULL && 421 if (go->active_buf != NULL &&
423 go->active_buf->bytesused >= GO7007_BUF_SIZE - 3) { 422 go->active_buf->bytesused >= GO7007_BUF_SIZE - 3) {
424 printk(KERN_DEBUG "go7007: dropping oversized frame\n"); 423 v4l2_info(go->video_dev, "dropping oversized frame\n");
425 go->active_buf->offset -= go->active_buf->bytesused; 424 go->active_buf->offset -= go->active_buf->bytesused;
426 go->active_buf->bytesused = 0; 425 go->active_buf->bytesused = 0;
427 go->active_buf->modet_active = 0; 426 go->active_buf->modet_active = 0;
@@ -669,8 +668,8 @@ void go7007_remove(struct go7007 *go)
669 if (i2c_del_adapter(&go->i2c_adapter) == 0) 668 if (i2c_del_adapter(&go->i2c_adapter) == 0)
670 go->i2c_adapter_online = 0; 669 go->i2c_adapter_online = 0;
671 else 670 else
672 printk(KERN_ERR 671 v4l2_err(go->video_dev,
673 "go7007: error removing I2C adapter!\n"); 672 "error removing I2C adapter!\n");
674 } 673 }
675 674
676 if (go->audio_enabled) 675 if (go->audio_enabled)