Commit 62474076 authored by Pete Eberlein's avatar Pete Eberlein Committed by Mauro Carvalho Chehab

V4L/DVB (13027): go7007: convert printks to v4l2_info

Use v4l2_info and v4l2_err where appropriate.
Signed-off-by: default avatarPete Eberlein <pete@sensoray.com>
Signed-off-by: default avatarDouglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 047efc7d
...@@ -49,7 +49,7 @@ int go7007_read_interrupt(struct go7007 *go, u16 *value, u16 *data) ...@@ -49,7 +49,7 @@ int go7007_read_interrupt(struct go7007 *go, u16 *value, u16 *data)
go->hpi_ops->read_interrupt(go); go->hpi_ops->read_interrupt(go);
if (wait_event_timeout(go->interrupt_waitq, if (wait_event_timeout(go->interrupt_waitq,
go->interrupt_available, 5*HZ) < 0) { go->interrupt_available, 5*HZ) < 0) {
printk(KERN_ERR "go7007: timeout waiting for read interrupt\n"); v4l2_err(go->video_dev, "timeout waiting for read interrupt\n");
return -1; return -1;
} }
if (!go->interrupt_available) if (!go->interrupt_available)
...@@ -97,13 +97,12 @@ static int go7007_load_encoder(struct go7007 *go) ...@@ -97,13 +97,12 @@ static int go7007_load_encoder(struct go7007 *go)
u16 intr_val, intr_data; u16 intr_val, intr_data;
if (request_firmware(&fw_entry, fw_name, go->dev)) { if (request_firmware(&fw_entry, fw_name, go->dev)) {
printk(KERN_ERR v4l2_err(go, "unable to load firmware from file "
"go7007: unable to load firmware from file \"%s\"\n", "\"%s\"\n", fw_name);
fw_name);
return -1; return -1;
} }
if (fw_entry->size < 16 || memcmp(fw_entry->data, "WISGO7007FW", 11)) { if (fw_entry->size < 16 || memcmp(fw_entry->data, "WISGO7007FW", 11)) {
printk(KERN_ERR "go7007: file \"%s\" does not appear to be " v4l2_err(go, "file \"%s\" does not appear to be "
"go7007 firmware\n", fw_name); "go7007 firmware\n", fw_name);
release_firmware(fw_entry); release_firmware(fw_entry);
return -1; return -1;
...@@ -111,7 +110,7 @@ static int go7007_load_encoder(struct go7007 *go) ...@@ -111,7 +110,7 @@ static int go7007_load_encoder(struct go7007 *go)
fw_len = fw_entry->size - 16; fw_len = fw_entry->size - 16;
bounce = kmalloc(fw_len, GFP_KERNEL); bounce = kmalloc(fw_len, GFP_KERNEL);
if (bounce == NULL) { if (bounce == NULL) {
printk(KERN_ERR "go7007: unable to allocate %d bytes for " v4l2_err(go, "unable to allocate %d bytes for "
"firmware transfer\n", fw_len); "firmware transfer\n", fw_len);
release_firmware(fw_entry); release_firmware(fw_entry);
return -1; return -1;
...@@ -122,7 +121,7 @@ static int go7007_load_encoder(struct go7007 *go) ...@@ -122,7 +121,7 @@ static int go7007_load_encoder(struct go7007 *go)
go7007_send_firmware(go, bounce, fw_len) < 0 || go7007_send_firmware(go, bounce, fw_len) < 0 ||
go7007_read_interrupt(go, &intr_val, &intr_data) < 0 || go7007_read_interrupt(go, &intr_val, &intr_data) < 0 ||
(intr_val & ~0x1) != 0x5a5a) { (intr_val & ~0x1) != 0x5a5a) {
printk(KERN_ERR "go7007: error transferring firmware\n"); v4l2_err(go, "error transferring firmware\n");
rv = -1; rv = -1;
} }
kfree(bounce); kfree(bounce);
...@@ -316,7 +315,7 @@ int go7007_start_encoder(struct go7007 *go) ...@@ -316,7 +315,7 @@ int go7007_start_encoder(struct go7007 *go)
if (go7007_send_firmware(go, fw, fw_len) < 0 || if (go7007_send_firmware(go, fw, fw_len) < 0 ||
go7007_read_interrupt(go, &intr_val, &intr_data) < 0) { go7007_read_interrupt(go, &intr_val, &intr_data) < 0) {
printk(KERN_ERR "go7007: error transferring firmware\n"); v4l2_err(go->video_dev, "error transferring firmware\n");
rv = -1; rv = -1;
goto start_error; goto start_error;
} }
...@@ -325,7 +324,7 @@ int go7007_start_encoder(struct go7007 *go) ...@@ -325,7 +324,7 @@ int go7007_start_encoder(struct go7007 *go)
go->parse_length = 0; go->parse_length = 0;
go->seen_frame = 0; go->seen_frame = 0;
if (go7007_stream_start(go) < 0) { if (go7007_stream_start(go) < 0) {
printk(KERN_ERR "go7007: error starting stream transfer\n"); v4l2_err(go->video_dev, "error starting stream transfer\n");
rv = -1; rv = -1;
goto start_error; goto start_error;
} }
...@@ -421,7 +420,7 @@ void go7007_parse_video_stream(struct go7007 *go, u8 *buf, int length) ...@@ -421,7 +420,7 @@ void go7007_parse_video_stream(struct go7007 *go, u8 *buf, int length)
for (i = 0; i < length; ++i) { for (i = 0; i < length; ++i) {
if (go->active_buf != NULL && if (go->active_buf != NULL &&
go->active_buf->bytesused >= GO7007_BUF_SIZE - 3) { go->active_buf->bytesused >= GO7007_BUF_SIZE - 3) {
printk(KERN_DEBUG "go7007: dropping oversized frame\n"); v4l2_info(go->video_dev, "dropping oversized frame\n");
go->active_buf->offset -= go->active_buf->bytesused; go->active_buf->offset -= go->active_buf->bytesused;
go->active_buf->bytesused = 0; go->active_buf->bytesused = 0;
go->active_buf->modet_active = 0; go->active_buf->modet_active = 0;
...@@ -669,8 +668,8 @@ void go7007_remove(struct go7007 *go) ...@@ -669,8 +668,8 @@ void go7007_remove(struct go7007 *go)
if (i2c_del_adapter(&go->i2c_adapter) == 0) if (i2c_del_adapter(&go->i2c_adapter) == 0)
go->i2c_adapter_online = 0; go->i2c_adapter_online = 0;
else else
printk(KERN_ERR v4l2_err(go->video_dev,
"go7007: error removing I2C adapter!\n"); "error removing I2C adapter!\n");
} }
if (go->audio_enabled) if (go->audio_enabled)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment