Commit 96292c89 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] pvrusb2: don't break long lines

Due to the 80-cols restrictions, and latter due to checkpatch
warnings, several strings were broken into multiple lines. This
is not considered a good practice anymore, as it makes harder
to grep for strings at the source code.

As we're right now fixing other drivers due to KERN_CONT, we need
to be able to identify what printk strings don't end with a "\n".
It is a way easier to detect those if we don't break long lines.

So, join those continuation lines.

The patch was generated via the script below, and manually
adjusted if needed.

</script>
use Text::Tabs;
while (<>) {
	if ($next ne "") {
		$c=$_;
		if ($c =~ /^\s+\"(.*)/) {
			$c2=$1;
			$next =~ s/\"\n$//;
			$n = expand($next);
			$funpos = index($n, '(');
			$pos = index($c2, '",');
			if ($funpos && $pos > 0) {
				$s1 = substr $c2, 0, $pos + 2;
				$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
				$s2 =~ s/^\s+//;

				$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");

				print unexpand("$next$s1\n");
				print unexpand("$s2\n") if ($s2 ne "");
			} else {
				print "$next$c2\n";
			}
			$next="";
			next;
		} else {
			print $next;
		}
		$next="";
	} else {
		if (m/\"$/) {
			if (!m/\\n\"$/) {
				$next=$_;
				next;
			}
		}
	}
	print $_;
}
</script>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 4d5ded75
...@@ -74,9 +74,7 @@ void pvr2_msp3400_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) ...@@ -74,9 +74,7 @@ void pvr2_msp3400_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
input = sp->def[hdw->input_val]; input = sp->def[hdw->input_val];
} else { } else {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"*** WARNING *** subdev msp3400 set_input:" "*** WARNING *** subdev msp3400 set_input: Invalid routing scheme (%u) and/or input (%d)",
" Invalid routing scheme (%u)"
" and/or input (%d)",
sid, hdw->input_val); sid, hdw->input_val);
return; return;
} }
......
...@@ -72,9 +72,7 @@ void pvr2_cs53l32a_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) ...@@ -72,9 +72,7 @@ void pvr2_cs53l32a_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
(hdw->input_val < 0) || (hdw->input_val < 0) ||
(hdw->input_val >= sp->cnt)) { (hdw->input_val >= sp->cnt)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"*** WARNING *** subdev v4l2 set_input:" "*** WARNING *** subdev v4l2 set_input: Invalid routing scheme (%u) and/or input (%d)",
" Invalid routing scheme (%u)"
" and/or input (%d)",
sid, hdw->input_val); sid, hdw->input_val);
return; return;
} }
......
...@@ -137,9 +137,7 @@ void pvr2_cx25840_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) ...@@ -137,9 +137,7 @@ void pvr2_cx25840_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
(hdw->input_val < 0) || (hdw->input_val < 0) ||
(hdw->input_val >= sp->cnt)) { (hdw->input_val >= sp->cnt)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"*** WARNING *** subdev cx2584x set_input:" "*** WARNING *** subdev cx2584x set_input: Invalid routing scheme (%u) and/or input (%d)",
" Invalid routing scheme (%u)"
" and/or input (%d)",
sid, hdw->input_val); sid, hdw->input_val);
return; return;
} }
......
...@@ -176,9 +176,7 @@ int pvr2_debugifc_print_status(struct pvr2_hdw *hdw, ...@@ -176,9 +176,7 @@ int pvr2_debugifc_print_status(struct pvr2_hdw *hdw,
pvr2_stream_get_stats(sp, &stats, 0); pvr2_stream_get_stats(sp, &stats, 0);
ccnt = scnprintf( ccnt = scnprintf(
buf,acnt, buf,acnt,
"Bytes streamed=%u" "Bytes streamed=%u URBs: queued=%u idle=%u ready=%u processed=%u failed=%u\n",
" URBs: queued=%u idle=%u ready=%u"
" processed=%u failed=%u\n",
stats.bytes_processed, stats.bytes_processed,
stats.buffers_in_queue, stats.buffers_in_queue,
stats.buffers_in_idle, stats.buffers_in_idle,
......
...@@ -56,8 +56,7 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw) ...@@ -56,8 +56,7 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw)
eeprom = kmalloc(EEPROM_SIZE,GFP_KERNEL); eeprom = kmalloc(EEPROM_SIZE,GFP_KERNEL);
if (!eeprom) { if (!eeprom) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Failed to allocate memory" "Failed to allocate memory required to read eeprom");
" required to read eeprom");
return NULL; return NULL;
} }
...@@ -74,8 +73,8 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw) ...@@ -74,8 +73,8 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw)
strange but it's what they do) */ strange but it's what they do) */
mode16 = (addr & 1); mode16 = (addr & 1);
eepromSize = (mode16 ? 4096 : 256); eepromSize = (mode16 ? 4096 : 256);
trace_eeprom("Examining %d byte eeprom at location 0x%x" trace_eeprom("Examining %d byte eeprom at location 0x%x using %d bit addressing",
" using %d bit addressing",eepromSize,addr, eepromSize, addr,
mode16 ? 16 : 8); mode16 ? 16 : 8);
msg[0].addr = addr; msg[0].addr = addr;
......
...@@ -188,9 +188,7 @@ static int pvr2_encoder_cmd(void *ctxt, ...@@ -188,9 +188,7 @@ static int pvr2_encoder_cmd(void *ctxt,
if (arg_cnt_send > (ARRAY_SIZE(wrData) - 4)) { if (arg_cnt_send > (ARRAY_SIZE(wrData) - 4)) {
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"Failed to write cx23416 command" "Failed to write cx23416 command - too many input arguments (was given %u limit %lu)",
" - too many input arguments"
" (was given %u limit %lu)",
arg_cnt_send, (long unsigned) ARRAY_SIZE(wrData) - 4); arg_cnt_send, (long unsigned) ARRAY_SIZE(wrData) - 4);
return -EINVAL; return -EINVAL;
} }
...@@ -198,9 +196,7 @@ static int pvr2_encoder_cmd(void *ctxt, ...@@ -198,9 +196,7 @@ static int pvr2_encoder_cmd(void *ctxt,
if (arg_cnt_recv > (ARRAY_SIZE(rdData) - 4)) { if (arg_cnt_recv > (ARRAY_SIZE(rdData) - 4)) {
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"Failed to write cx23416 command" "Failed to write cx23416 command - too many return arguments (was given %u limit %lu)",
" - too many return arguments"
" (was given %u limit %lu)",
arg_cnt_recv, (long unsigned) ARRAY_SIZE(rdData) - 4); arg_cnt_recv, (long unsigned) ARRAY_SIZE(rdData) - 4);
return -EINVAL; return -EINVAL;
} }
...@@ -248,14 +244,12 @@ static int pvr2_encoder_cmd(void *ctxt, ...@@ -248,14 +244,12 @@ static int pvr2_encoder_cmd(void *ctxt,
retry_flag = !0; retry_flag = !0;
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"Encoder timed out waiting for us" "Encoder timed out waiting for us; arranging to retry");
"; arranging to retry");
} else { } else {
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"***WARNING*** device's encoder" "***WARNING*** device's encoder appears to be stuck (status=0x%08x)",
" appears to be stuck" rdData[0]);
" (status=0x%08x)",rdData[0]);
} }
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
...@@ -293,11 +287,7 @@ static int pvr2_encoder_cmd(void *ctxt, ...@@ -293,11 +287,7 @@ static int pvr2_encoder_cmd(void *ctxt,
} }
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"Giving up on command." "Giving up on command. This is normally recovered via a firmware reload and re-initialization; concern is only warranted if this happens repeatedly and rapidly.");
" This is normally recovered via a firmware"
" reload and re-initialization; concern"
" is only warranted if this happens repeatedly"
" and rapidly.");
break; break;
} }
wrData[0] = 0x7; wrData[0] = 0x7;
...@@ -325,9 +315,7 @@ static int pvr2_encoder_vcmd(struct pvr2_hdw *hdw, int cmd, ...@@ -325,9 +315,7 @@ static int pvr2_encoder_vcmd(struct pvr2_hdw *hdw, int cmd,
if (args > ARRAY_SIZE(data)) { if (args > ARRAY_SIZE(data)) {
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"Failed to write cx23416 command" "Failed to write cx23416 command - too many arguments (was given %u limit %lu)",
" - too many arguments"
" (was given %u limit %lu)",
args, (long unsigned) ARRAY_SIZE(data)); args, (long unsigned) ARRAY_SIZE(data));
return -EINVAL; return -EINVAL;
} }
...@@ -433,8 +421,7 @@ int pvr2_encoder_configure(struct pvr2_hdw *hdw) ...@@ -433,8 +421,7 @@ int pvr2_encoder_configure(struct pvr2_hdw *hdw)
{ {
int ret; int ret;
int val; int val;
pvr2_trace(PVR2_TRACE_ENCODER,"pvr2_encoder_configure" pvr2_trace(PVR2_TRACE_ENCODER, "pvr2_encoder_configure (cx2341x module)");
" (cx2341x module)");
hdw->enc_ctl_state.port = CX2341X_PORT_STREAMING; hdw->enc_ctl_state.port = CX2341X_PORT_STREAMING;
hdw->enc_ctl_state.width = hdw->res_hor_val; hdw->enc_ctl_state.width = hdw->res_hor_val;
hdw->enc_ctl_state.height = hdw->res_ver_val; hdw->enc_ctl_state.height = hdw->res_ver_val;
......
...@@ -1371,8 +1371,7 @@ static int pvr2_locate_firmware(struct pvr2_hdw *hdw, ...@@ -1371,8 +1371,7 @@ static int pvr2_locate_firmware(struct pvr2_hdw *hdw,
fwnames[idx], fwnames[idx],
&hdw->usb_dev->dev); &hdw->usb_dev->dev);
if (!ret) { if (!ret) {
trace_firmware("Located %s firmware: %s;" trace_firmware("Located %s firmware: %s; uploading...",
" uploading...",
fwtypename, fwtypename,
fwnames[idx]); fwnames[idx]);
return idx; return idx;
...@@ -1383,21 +1382,17 @@ static int pvr2_locate_firmware(struct pvr2_hdw *hdw, ...@@ -1383,21 +1382,17 @@ static int pvr2_locate_firmware(struct pvr2_hdw *hdw,
return ret; return ret;
} }
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"***WARNING***" "***WARNING*** Device %s firmware seems to be missing.",
" Device %s firmware"
" seems to be missing.",
fwtypename); fwtypename);
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Did you install the pvrusb2 firmware files" "Did you install the pvrusb2 firmware files in their proper location?");
" in their proper location?");
if (fwcount == 1) { if (fwcount == 1) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"request_firmware unable to locate %s file %s", "request_firmware unable to locate %s file %s",
fwtypename,fwnames[0]); fwtypename,fwnames[0]);
} else { } else {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"request_firmware unable to locate" "request_firmware unable to locate one of the following %s files:",
" one of the following %s files:",
fwtypename); fwtypename);
for (idx = 0; idx < fwcount; idx++) { for (idx = 0; idx < fwcount; idx++) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
...@@ -1431,8 +1426,7 @@ static int pvr2_upload_firmware1(struct pvr2_hdw *hdw) ...@@ -1431,8 +1426,7 @@ static int pvr2_upload_firmware1(struct pvr2_hdw *hdw)
if (!hdw->hdw_desc->fx2_firmware.cnt) { if (!hdw->hdw_desc->fx2_firmware.cnt) {
hdw->fw1_state = FW1_STATE_OK; hdw->fw1_state = FW1_STATE_OK;
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Connected device type defines" "Connected device type defines no firmware to upload; ignoring firmware");
" no firmware to upload; ignoring firmware");
return -ENOTTY; return -ENOTTY;
} }
...@@ -1457,13 +1451,11 @@ static int pvr2_upload_firmware1(struct pvr2_hdw *hdw) ...@@ -1457,13 +1451,11 @@ static int pvr2_upload_firmware1(struct pvr2_hdw *hdw)
(!(hdw->hdw_desc->flag_fx2_16kb && (fwsize == 0x4000)))) { (!(hdw->hdw_desc->flag_fx2_16kb && (fwsize == 0x4000)))) {
if (hdw->hdw_desc->flag_fx2_16kb) { if (hdw->hdw_desc->flag_fx2_16kb) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Wrong fx2 firmware size" "Wrong fx2 firmware size (expected 8192 or 16384, got %u)",
" (expected 8192 or 16384, got %u)",
fwsize); fwsize);
} else { } else {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Wrong fx2 firmware size" "Wrong fx2 firmware size (expected 8192, got %u)",
" (expected 8192, got %u)",
fwsize); fwsize);
} }
release_firmware(fw_entry); release_firmware(fw_entry);
...@@ -1585,8 +1577,7 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw) ...@@ -1585,8 +1577,7 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw)
if (fw_len % sizeof(u32)) { if (fw_len % sizeof(u32)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"size of %s firmware" "size of %s firmware must be a multiple of %zu bytes",
" must be a multiple of %zu bytes",
fw_files[fwidx],sizeof(u32)); fw_files[fwidx],sizeof(u32));
release_firmware(fw_entry); release_firmware(fw_entry);
ret = -EINVAL; ret = -EINVAL;
...@@ -1887,8 +1878,7 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw) ...@@ -1887,8 +1878,7 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw)
bcnt = pvr2_std_id_to_str(buf,sizeof(buf),hdw->std_mask_eeprom); bcnt = pvr2_std_id_to_str(buf,sizeof(buf),hdw->std_mask_eeprom);
pvr2_trace(PVR2_TRACE_STD, pvr2_trace(PVR2_TRACE_STD,
"Supported video standard(s) reported available" "Supported video standard(s) reported available in hardware: %.*s",
" in hardware: %.*s",
bcnt,buf); bcnt,buf);
hdw->std_mask_avail = hdw->std_mask_eeprom; hdw->std_mask_avail = hdw->std_mask_eeprom;
...@@ -1897,8 +1887,7 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw) ...@@ -1897,8 +1887,7 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw)
if (std2) { if (std2) {
bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std2); bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std2);
pvr2_trace(PVR2_TRACE_STD, pvr2_trace(PVR2_TRACE_STD,
"Expanding supported video standards" "Expanding supported video standards to include: %.*s",
" to include: %.*s",
bcnt,buf); bcnt,buf);
hdw->std_mask_avail |= std2; hdw->std_mask_avail |= std2;
} }
...@@ -1917,8 +1906,8 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw) ...@@ -1917,8 +1906,8 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw)
if (std3) { if (std3) {
bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std3); bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std3);
pvr2_trace(PVR2_TRACE_STD, pvr2_trace(PVR2_TRACE_STD,
"Initial video standard" "Initial video standard (determined by device type): %.*s",
" (determined by device type): %.*s",bcnt,buf); bcnt, buf);
hdw->std_mask_cur = std3; hdw->std_mask_cur = std3;
hdw->std_dirty = !0; hdw->std_dirty = !0;
return; return;
...@@ -1980,8 +1969,7 @@ static void pvr2_hdw_cx25840_vbi_hack(struct pvr2_hdw *hdw) ...@@ -1980,8 +1969,7 @@ static void pvr2_hdw_cx25840_vbi_hack(struct pvr2_hdw *hdw)
} }
pvr2_trace(PVR2_TRACE_INIT, pvr2_trace(PVR2_TRACE_INIT,
"Module ID %u:" "Module ID %u: Executing cx25840 VBI hack",
" Executing cx25840 VBI hack",
hdw->decoder_client_id); hdw->decoder_client_id);
memset(&fmt, 0, sizeof(fmt)); memset(&fmt, 0, sizeof(fmt));
fmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE; fmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
...@@ -2007,8 +1995,7 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, ...@@ -2007,8 +1995,7 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw,
fname = (mid < ARRAY_SIZE(module_names)) ? module_names[mid] : NULL; fname = (mid < ARRAY_SIZE(module_names)) ? module_names[mid] : NULL;
if (!fname) { if (!fname) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Module ID %u for device %s has no name?" "Module ID %u for device %s has no name? The driver might have a configuration problem.",
" The driver might have a configuration problem.",
mid, mid,
hdw->hdw_desc->description); hdw->hdw_desc->description);
return -EINVAL; return -EINVAL;
...@@ -2027,32 +2014,27 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, ...@@ -2027,32 +2014,27 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw,
ARRAY_SIZE(i2caddr)); ARRAY_SIZE(i2caddr));
if (i2ccnt) { if (i2ccnt) {
pvr2_trace(PVR2_TRACE_INIT, pvr2_trace(PVR2_TRACE_INIT,
"Module ID %u:" "Module ID %u: Using default i2c address list",
" Using default i2c address list",
mid); mid);
} }
} }
if (!i2ccnt) { if (!i2ccnt) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Module ID %u (%s) for device %s:" "Module ID %u (%s) for device %s: No i2c addresses. The driver might have a configuration problem.",
" No i2c addresses."
" The driver might have a configuration problem.",
mid, fname, hdw->hdw_desc->description); mid, fname, hdw->hdw_desc->description);
return -EINVAL; return -EINVAL;
} }
if (i2ccnt == 1) { if (i2ccnt == 1) {
pvr2_trace(PVR2_TRACE_INIT, pvr2_trace(PVR2_TRACE_INIT,
"Module ID %u:" "Module ID %u: Setting up with specified i2c address 0x%x",
" Setting up with specified i2c address 0x%x",
mid, i2caddr[0]); mid, i2caddr[0]);
sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap, sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap,
fname, i2caddr[0], NULL); fname, i2caddr[0], NULL);
} else { } else {
pvr2_trace(PVR2_TRACE_INIT, pvr2_trace(PVR2_TRACE_INIT,
"Module ID %u:" "Module ID %u: Setting up with address probe list",
" Setting up with address probe list",
mid); mid);
sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap, sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap,
fname, 0, i2caddr); fname, 0, i2caddr);
...@@ -2060,9 +2042,7 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, ...@@ -2060,9 +2042,7 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw,
if (!sd) { if (!sd) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Module ID %u (%s) for device %s failed to load." "Module ID %u (%s) for device %s failed to load. Possible missing sub-device kernel module or initialization failure within module.",
" Possible missing sub-device kernel module or"
" initialization failure within module.",
mid, fname, hdw->hdw_desc->description); mid, fname, hdw->hdw_desc->description);
return -EIO; return -EIO;
} }
...@@ -2124,18 +2104,14 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw) ...@@ -2124,18 +2104,14 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw)
== 0); == 0);
if (reloadFl) { if (reloadFl) {
pvr2_trace(PVR2_TRACE_INIT, pvr2_trace(PVR2_TRACE_INIT,
"USB endpoint config looks strange" "USB endpoint config looks strange; possibly firmware needs to be loaded");
"; possibly firmware needs to be"
" loaded");
} }
} }
if (!reloadFl) { if (!reloadFl) {
reloadFl = !pvr2_hdw_check_firmware(hdw); reloadFl = !pvr2_hdw_check_firmware(hdw);
if (reloadFl) { if (reloadFl) {
pvr2_trace(PVR2_TRACE_INIT, pvr2_trace(PVR2_TRACE_INIT,
"Check for FX2 firmware failed" "Check for FX2 firmware failed; possibly firmware needs to be loaded");
"; possibly firmware needs to be"
" loaded");
} }
} }
if (reloadFl) { if (reloadFl) {
...@@ -2200,8 +2176,7 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw) ...@@ -2200,8 +2176,7 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw)
if (!pvr2_hdw_dev_ok(hdw)) return; if (!pvr2_hdw_dev_ok(hdw)) return;
if (ret < 0) { if (ret < 0) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Unable to determine location of eeprom," "Unable to determine location of eeprom, skipping");
" skipping");
} else { } else {
hdw->eeprom_addr = ret; hdw->eeprom_addr = ret;
pvr2_eeprom_analyze(hdw); pvr2_eeprom_analyze(hdw);
...@@ -2254,8 +2229,7 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw) ...@@ -2254,8 +2229,7 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw)
idx = get_default_error_tolerance(hdw); idx = get_default_error_tolerance(hdw);
if (idx) { if (idx) {
pvr2_trace(PVR2_TRACE_INIT, pvr2_trace(PVR2_TRACE_INIT,
"pvr2_hdw_setup: video stream %p" "pvr2_hdw_setup: video stream %p setting tolerance %u",
" setting tolerance %u",
hdw->vid_stream,idx); hdw->vid_stream,idx);
} }
pvr2_stream_setup(hdw->vid_stream,hdw->usb_dev, pvr2_stream_setup(hdw->vid_stream,hdw->usb_dev,
...@@ -2285,16 +2259,13 @@ static void pvr2_hdw_setup(struct pvr2_hdw *hdw) ...@@ -2285,16 +2259,13 @@ static void pvr2_hdw_setup(struct pvr2_hdw *hdw)
if (hdw->flag_init_ok) { if (hdw->flag_init_ok) {
pvr2_trace( pvr2_trace(
PVR2_TRACE_INFO, PVR2_TRACE_INFO,
"Device initialization" "Device initialization completed successfully.");
" completed successfully.");
break; break;
} }
if (hdw->fw1_state == FW1_STATE_RELOAD) { if (hdw->fw1_state == FW1_STATE_RELOAD) {
pvr2_trace( pvr2_trace(
PVR2_TRACE_INFO, PVR2_TRACE_INFO,
"Device microcontroller firmware" "Device microcontroller firmware (re)loaded; it should now reset and reconnect.");
" (re)loaded; it should now reset"
" and reconnect.");
break; break;
} }
pvr2_trace( pvr2_trace(
...@@ -2303,48 +2274,35 @@ static void pvr2_hdw_setup(struct pvr2_hdw *hdw) ...@@ -2303,48 +2274,35 @@ static void pvr2_hdw_setup(struct pvr2_hdw *hdw)
if (hdw->fw1_state == FW1_STATE_MISSING) { if (hdw->fw1_state == FW1_STATE_MISSING) {
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"Giving up since device" "Giving up since device microcontroller firmware appears to be missing.");
" microcontroller firmware"
" appears to be missing.");
break; break;
} }
} }
if (hdw->flag_modulefail) { if (hdw->flag_modulefail) {
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"***WARNING*** pvrusb2 driver initialization" "***WARNING*** pvrusb2 driver initialization failed due to the failure of one or more sub-device kernel modules.");
" failed due to the failure of one or more"
" sub-device kernel modules.");
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"You need to resolve the failing condition" "You need to resolve the failing condition before this driver can function. There should be some earlier messages giving more information about the problem.");
" before this driver can function. There"
" should be some earlier messages giving more"
" information about the problem.");
break; break;
} }
if (procreload) { if (procreload) {
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"Attempting pvrusb2 recovery by reloading" "Attempting pvrusb2 recovery by reloading primary firmware.");
" primary firmware.");
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"If this works, device should disconnect" "If this works, device should disconnect and reconnect in a sane state.");
" and reconnect in a sane state.");
hdw->fw1_state = FW1_STATE_UNKNOWN; hdw->fw1_state = FW1_STATE_UNKNOWN;
pvr2_upload_firmware1(hdw); pvr2_upload_firmware1(hdw);
} else { } else {
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"***WARNING*** pvrusb2 device hardware" "***WARNING*** pvrusb2 device hardware appears to be jammed and I can't clear it.");
" appears to be jammed"
" and I can't clear it.");
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"You might need to power cycle" "You might need to power cycle the pvrusb2 device in order to recover.");
" the pvrusb2 device"
" in order to recover.");
} }
} while (0); } while (0);
pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_setup(hdw=%p) end",hdw); pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_setup(hdw=%p) end",hdw);
...@@ -2396,12 +2354,8 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, ...@@ -2396,12 +2354,8 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
hdw_desc = (const struct pvr2_device_desc *)(devid->driver_info); hdw_desc = (const struct pvr2_device_desc *)(devid->driver_info);
if (hdw_desc == NULL) { if (hdw_desc == NULL) {
pvr2_trace(PVR2_TRACE_INIT, "pvr2_hdw_create:" pvr2_trace(PVR2_TRACE_INIT, "pvr2_hdw_create: No device description pointer, unable to continue.");
" No device description pointer," pvr2_trace(PVR2_TRACE_INIT, "If you have a new device type, please contact Mike Isely <isely@pobox.com> to get it included in the driver\n");
" unable to continue.");
pvr2_trace(PVR2_TRACE_INIT, "If you have a new device type,"
" please contact Mike Isely <isely@pobox.com>"
" to get it included in the driver\n");
goto fail; goto fail;
} }
...@@ -2413,14 +2367,12 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, ...@@ -2413,14 +2367,12 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
if (hdw_desc->flag_is_experimental) { if (hdw_desc->flag_is_experimental) {
pvr2_trace(PVR2_TRACE_INFO, "**********"); pvr2_trace(PVR2_TRACE_INFO, "**********");
pvr2_trace(PVR2_TRACE_INFO, pvr2_trace(PVR2_TRACE_INFO,
"WARNING: Support for this device (%s) is" "WARNING: Support for this device (%s) is experimental.",
" experimental.", hdw_desc->description); hdw_desc->description);
pvr2_trace(PVR2_TRACE_INFO, pvr2_trace(PVR2_TRACE_INFO,
"Important functionality might not be" "Important functionality might not be entirely working.");
" entirely working.");
pvr2_trace(PVR2_TRACE_INFO, pvr2_trace(PVR2_TRACE_INFO,
"Please consider contacting the driver author to" "Please consider contacting the driver author to help with further stabilization of the driver.");
" help with further stabilization of the driver.");
pvr2_trace(PVR2_TRACE_INFO, "**********"); pvr2_trace(PVR2_TRACE_INFO, "**********");
} }
if (!hdw) goto fail; if (!hdw) goto fail;
...@@ -3375,8 +3327,7 @@ static u8 *pvr2_full_eeprom_fetch(struct pvr2_hdw *hdw) ...@@ -3375,8 +3327,7 @@ static u8 *pvr2_full_eeprom_fetch(struct pvr2_hdw *hdw)
eeprom = kmalloc(EEPROM_SIZE,GFP_KERNEL); eeprom = kmalloc(EEPROM_SIZE,GFP_KERNEL);
if (!eeprom) { if (!eeprom) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Failed to allocate memory" "Failed to allocate memory required to read eeprom");
" required to read eeprom");
return NULL; return NULL;
} }
...@@ -3393,8 +3344,8 @@ static u8 *pvr2_full_eeprom_fetch(struct pvr2_hdw *hdw) ...@@ -3393,8 +3344,8 @@ static u8 *pvr2_full_eeprom_fetch(struct pvr2_hdw *hdw)
strange but it's what they do) */ strange but it's what they do) */
mode16 = (addr & 1); mode16 = (addr & 1);
eepromSize = (mode16 ? EEPROM_SIZE : 256); eepromSize = (mode16 ? EEPROM_SIZE : 256);
trace_eeprom("Examining %d byte eeprom at location 0x%x" trace_eeprom("Examining %d byte eeprom at location 0x%x using %d bit addressing",
" using %d bit addressing",eepromSize,addr, eepromSize, addr,
mode16 ? 16 : 8); mode16 ? 16 : 8);
msg[0].addr = addr; msg[0].addr = addr;
...@@ -3461,8 +3412,8 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, ...@@ -3461,8 +3412,8 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw,
if (hdw->fw_cpu_flag) { if (hdw->fw_cpu_flag) {
hdw->fw_size = (mode == 1) ? 0x4000 : 0x2000; hdw->fw_size = (mode == 1) ? 0x4000 : 0x2000;
pvr2_trace(PVR2_TRACE_FIRMWARE, pvr2_trace(PVR2_TRACE_FIRMWARE,
"Preparing to suck out CPU firmware" "Preparing to suck out CPU firmware (size=%u)",
" (size=%u)", hdw->fw_size); hdw->fw_size);
hdw->fw_buffer = kzalloc(hdw->fw_size,GFP_KERNEL); hdw->fw_buffer = kzalloc(hdw->fw_size,GFP_KERNEL);
if (!hdw->fw_buffer) { if (!hdw->fw_buffer) {
hdw->fw_size = 0; hdw->fw_size = 0;
...@@ -3620,21 +3571,18 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw, ...@@ -3620,21 +3571,18 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
struct timer_list timer; struct timer_list timer;
if (!hdw->ctl_lock_held) { if (!hdw->ctl_lock_held) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Attempted to execute control transfer" "Attempted to execute control transfer without lock!!");
" without lock!!");
return -EDEADLK; return -EDEADLK;
} }
if (!hdw->flag_ok && !probe_fl) { if (!hdw->flag_ok && !probe_fl) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Attempted to execute control transfer" "Attempted to execute control transfer when device not ok");
" when device not ok");
return -EIO; return -EIO;
} }
if (!(hdw->ctl_read_urb && hdw->ctl_write_urb)) { if (!(hdw->ctl_read_urb && hdw->ctl_write_urb)) {
if (!probe_fl) { if (!probe_fl) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Attempted to execute control transfer" "Attempted to execute control transfer when USB is disconnected");
" when USB is disconnected");
} }
return -ENOTTY; return -ENOTTY;
} }
...@@ -3645,16 +3593,14 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw, ...@@ -3645,16 +3593,14 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
if (write_len > PVR2_CTL_BUFFSIZE) { if (write_len > PVR2_CTL_BUFFSIZE) {
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"Attempted to execute %d byte" "Attempted to execute %d byte control-write transfer (limit=%d)",
" control-write transfer (limit=%d)",
write_len,PVR2_CTL_BUFFSIZE); write_len,PVR2_CTL_BUFFSIZE);
return -EINVAL; return -EINVAL;
} }
if (read_len > PVR2_CTL_BUFFSIZE) { if (read_len > PVR2_CTL_BUFFSIZE) {
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"Attempted to execute %d byte" "Attempted to execute %d byte control-read transfer (limit=%d)",
" control-read transfer (limit=%d)",
write_len,PVR2_CTL_BUFFSIZE); write_len,PVR2_CTL_BUFFSIZE);
return -EINVAL; return -EINVAL;
} }
...@@ -3703,8 +3649,8 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw, ...@@ -3703,8 +3649,8 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
status = usb_submit_urb(hdw->ctl_write_urb,GFP_KERNEL); status = usb_submit_urb(hdw->ctl_write_urb,GFP_KERNEL);
if (status < 0) { if (status < 0) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Failed to submit write-control" "Failed to submit write-control URB status=%d",
" URB status=%d",status); status);
hdw->ctl_write_pend_flag = 0; hdw->ctl_write_pend_flag = 0;
goto done; goto done;
} }
...@@ -3727,8 +3673,8 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw, ...@@ -3727,8 +3673,8 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
status = usb_submit_urb(hdw->ctl_read_urb,GFP_KERNEL); status = usb_submit_urb(hdw->ctl_read_urb,GFP_KERNEL);
if (status < 0) { if (status < 0) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Failed to submit read-control" "Failed to submit read-control URB status=%d",
" URB status=%d",status); status);
hdw->ctl_read_pend_flag = 0; hdw->ctl_read_pend_flag = 0;
goto done; goto done;
} }
...@@ -3770,8 +3716,7 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw, ...@@ -3770,8 +3716,7 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
status = hdw->ctl_write_urb->status; status = hdw->ctl_write_urb->status;
if (!probe_fl) { if (!probe_fl) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"control-write URB failure," "control-write URB failure, status=%d",
" status=%d",
status); status);
} }
goto done; goto done;
...@@ -3781,8 +3726,7 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw, ...@@ -3781,8 +3726,7 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
status = -EIO; status = -EIO;
if (!probe_fl) { if (!probe_fl) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"control-write URB short," "control-write URB short, expected=%d got=%d",
" expected=%d got=%d",
write_len, write_len,
hdw->ctl_write_urb->actual_length); hdw->ctl_write_urb->actual_length);
} }
...@@ -3800,8 +3744,7 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw, ...@@ -3800,8 +3744,7 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
status = hdw->ctl_read_urb->status; status = hdw->ctl_read_urb->status;
if (!probe_fl) { if (!probe_fl) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"control-read URB failure," "control-read URB failure, status=%d",
" status=%d",
status); status);
} }
goto done; goto done;
...@@ -3811,8 +3754,7 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw, ...@@ -3811,8 +3754,7 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
status = -EIO; status = -EIO;
if (!probe_fl) { if (!probe_fl) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"control-read URB short," "control-read URB short, expected=%d got=%d",
" expected=%d got=%d",
read_len, read_len,
hdw->ctl_read_urb->actual_length); hdw->ctl_read_urb->actual_length);
} }
...@@ -4799,9 +4741,7 @@ static unsigned int pvr2_hdw_report_unlocked(struct pvr2_hdw *hdw,int which, ...@@ -4799,9 +4741,7 @@ static unsigned int pvr2_hdw_report_unlocked(struct pvr2_hdw *hdw,int which,
0); 0);
return scnprintf( return scnprintf(
buf,acnt, buf,acnt,
"Bytes streamed=%u" "Bytes streamed=%u URBs: queued=%u idle=%u ready=%u processed=%u failed=%u",
" URBs: queued=%u idle=%u ready=%u"
" processed=%u failed=%u",
stats.bytes_processed, stats.bytes_processed,
stats.buffers_in_queue, stats.buffers_in_queue,
stats.buffers_in_idle, stats.buffers_in_idle,
...@@ -5013,8 +4953,7 @@ int pvr2_hdw_gpio_chg_dir(struct pvr2_hdw *hdw,u32 msk,u32 val) ...@@ -5013,8 +4953,7 @@ int pvr2_hdw_gpio_chg_dir(struct pvr2_hdw *hdw,u32 msk,u32 val)
if (ret) return ret; if (ret) return ret;
nval = (cval & ~msk) | (val & msk); nval = (cval & ~msk) | (val & msk);
pvr2_trace(PVR2_TRACE_GPIO, pvr2_trace(PVR2_TRACE_GPIO,
"GPIO direction changing 0x%x:0x%x" "GPIO direction changing 0x%x:0x%x from 0x%x to 0x%x",
" from 0x%x to 0x%x",
msk,val,cval,nval); msk,val,cval,nval);
} else { } else {
nval = val; nval = val;
...@@ -5057,9 +4996,7 @@ void pvr2_hdw_status_poll(struct pvr2_hdw *hdw) ...@@ -5057,9 +4996,7 @@ void pvr2_hdw_status_poll(struct pvr2_hdw *hdw)
now. (Of course, no sub-drivers seem to implement it either. now. (Of course, no sub-drivers seem to implement it either.
But now it's a a chicken and egg problem...) */ But now it's a a chicken and egg problem...) */
v4l2_device_call_all(&hdw->v4l2_dev, 0, tuner, g_tuner, vtp); v4l2_device_call_all(&hdw->v4l2_dev, 0, tuner, g_tuner, vtp);
pvr2_trace(PVR2_TRACE_CHIPS, "subdev status poll" pvr2_trace(PVR2_TRACE_CHIPS, "subdev status poll type=%u strength=%u audio=0x%x cap=0x%x low=%u hi=%u",
" type=%u strength=%u audio=0x%x cap=0x%x"
" low=%u hi=%u",
vtp->type, vtp->type,
vtp->signal, vtp->rxsubchans, vtp->capability, vtp->signal, vtp->rxsubchans, vtp->capability,
vtp->rangelow, vtp->rangehigh); vtp->rangelow, vtp->rangehigh);
......
...@@ -62,8 +62,7 @@ static int pvr2_i2c_write(struct pvr2_hdw *hdw, /* Context */ ...@@ -62,8 +62,7 @@ static int pvr2_i2c_write(struct pvr2_hdw *hdw, /* Context */
if (!data) length = 0; if (!data) length = 0;
if (length > (sizeof(hdw->cmd_buffer) - 3)) { if (length > (sizeof(hdw->cmd_buffer) - 3)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Killing an I2C write to %u that is too large" "Killing an I2C write to %u that is too large (desired=%u limit=%u)",
" (desired=%u limit=%u)",
i2c_addr, i2c_addr,
length,(unsigned int)(sizeof(hdw->cmd_buffer) - 3)); length,(unsigned int)(sizeof(hdw->cmd_buffer) - 3));
return -ENOTSUPP; return -ENOTSUPP;
...@@ -90,8 +89,7 @@ static int pvr2_i2c_write(struct pvr2_hdw *hdw, /* Context */ ...@@ -90,8 +89,7 @@ static int pvr2_i2c_write(struct pvr2_hdw *hdw, /* Context */
if (hdw->cmd_buffer[0] != 8) { if (hdw->cmd_buffer[0] != 8) {
ret = -EIO; ret = -EIO;
if (hdw->cmd_buffer[0] != 7) { if (hdw->cmd_buffer[0] != 7) {
trace_i2c("unexpected status" trace_i2c("unexpected status from i2_write[%d]: %d",
" from i2_write[%d]: %d",
i2c_addr,hdw->cmd_buffer[0]); i2c_addr,hdw->cmd_buffer[0]);
} }
} }
...@@ -116,16 +114,14 @@ static int pvr2_i2c_read(struct pvr2_hdw *hdw, /* Context */ ...@@ -116,16 +114,14 @@ static int pvr2_i2c_read(struct pvr2_hdw *hdw, /* Context */
if (!data) dlen = 0; if (!data) dlen = 0;
if (dlen > (sizeof(hdw->cmd_buffer) - 4)) { if (dlen > (sizeof(hdw->cmd_buffer) - 4)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Killing an I2C read to %u that has wlen too large" "Killing an I2C read to %u that has wlen too large (desired=%u limit=%u)",
" (desired=%u limit=%u)",
i2c_addr, i2c_addr,
dlen,(unsigned int)(sizeof(hdw->cmd_buffer) - 4)); dlen,(unsigned int)(sizeof(hdw->cmd_buffer) - 4));
return -ENOTSUPP; return -ENOTSUPP;
} }
if (res && (rlen > (sizeof(hdw->cmd_buffer) - 1))) { if (res && (rlen > (sizeof(hdw->cmd_buffer) - 1))) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Killing an I2C read to %u that has rlen too large" "Killing an I2C read to %u that has rlen too large (desired=%u limit=%u)",
" (desired=%u limit=%u)",
i2c_addr, i2c_addr,
rlen,(unsigned int)(sizeof(hdw->cmd_buffer) - 1)); rlen,(unsigned int)(sizeof(hdw->cmd_buffer) - 1));
return -ENOTSUPP; return -ENOTSUPP;
...@@ -154,8 +150,7 @@ static int pvr2_i2c_read(struct pvr2_hdw *hdw, /* Context */ ...@@ -154,8 +150,7 @@ static int pvr2_i2c_read(struct pvr2_hdw *hdw, /* Context */
if (hdw->cmd_buffer[0] != 8) { if (hdw->cmd_buffer[0] != 8) {
ret = -EIO; ret = -EIO;
if (hdw->cmd_buffer[0] != 7) { if (hdw->cmd_buffer[0] != 7) {
trace_i2c("unexpected status" trace_i2c("unexpected status from i2_read[%d]: %d",
" from i2_read[%d]: %d",
i2c_addr,hdw->cmd_buffer[0]); i2c_addr,hdw->cmd_buffer[0]);
} }
} }
...@@ -352,13 +347,11 @@ static int i2c_hack_cx25840(struct pvr2_hdw *hdw, ...@@ -352,13 +347,11 @@ static int i2c_hack_cx25840(struct pvr2_hdw *hdw,
if ((ret != 0) || (*rdata == 0x04) || (*rdata == 0x0a)) { if ((ret != 0) || (*rdata == 0x04) || (*rdata == 0x0a)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"WARNING: Detected a wedged cx25840 chip;" "WARNING: Detected a wedged cx25840 chip; the device will not work.");
" the device will not work.");
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"WARNING: Try power cycling the pvrusb2 device."); "WARNING: Try power cycling the pvrusb2 device.");
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"WARNING: Disabling further access to the device" "WARNING: Disabling further access to the device to prevent other foul-ups.");
" to prevent other foul-ups.");
// This blocks all further communication with the part. // This blocks all further communication with the part.
hdw->i2c_func[0x44] = NULL; hdw->i2c_func[0x44] = NULL;
pvr2_hdw_render_useless(hdw); pvr2_hdw_render_useless(hdw);
...@@ -444,8 +437,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, ...@@ -444,8 +437,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,
} }
} else if (num == 2) { } else if (num == 2) {
if (msgs[0].addr != msgs[1].addr) { if (msgs[0].addr != msgs[1].addr) {
trace_i2c("i2c refusing 2 phase transfer with" trace_i2c("i2c refusing 2 phase transfer with conflicting target addresses");
" conflicting target addresses");
ret = -ENOTSUPP; ret = -ENOTSUPP;
goto done; goto done;
} }
...@@ -477,8 +469,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, ...@@ -477,8 +469,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,
ret = 2; ret = 2;
goto done; goto done;
} else { } else {
trace_i2c("i2c refusing complex transfer" trace_i2c("i2c refusing complex transfer read0=%d read1=%d",
" read0=%d read1=%d",
(msgs[0].flags & I2C_M_RD), (msgs[0].flags & I2C_M_RD),
(msgs[1].flags & I2C_M_RD)); (msgs[1].flags & I2C_M_RD));
} }
...@@ -492,8 +483,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, ...@@ -492,8 +483,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,
for (idx = 0; idx < num; idx++) { for (idx = 0; idx < num; idx++) {
cnt = msgs[idx].len; cnt = msgs[idx].len;
printk(KERN_INFO printk(KERN_INFO
"pvrusb2 i2c xfer %u/%u:" "pvrusb2 i2c xfer %u/%u: addr=0x%x len=%d %s",
" addr=0x%x len=%d %s",
idx+1,num, idx+1,num,
msgs[idx].addr, msgs[idx].addr,
cnt, cnt,
...@@ -668,8 +658,7 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw) ...@@ -668,8 +658,7 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw)
the emulated IR receiver. */ the emulated IR receiver. */
if (do_i2c_probe(hdw, 0x71)) { if (do_i2c_probe(hdw, 0x71)) {
pvr2_trace(PVR2_TRACE_INFO, pvr2_trace(PVR2_TRACE_INFO,
"Device has newer IR hardware;" "Device has newer IR hardware; disabling unneeded virtual IR device");
" disabling unneeded virtual IR device");
hdw->i2c_func[0x18] = NULL; hdw->i2c_func[0x18] = NULL;
/* Remember that this is a different device... */ /* Remember that this is a different device... */
hdw->ir_scheme_active = PVR2_IR_SCHEME_24XXX_MCE; hdw->ir_scheme_active = PVR2_IR_SCHEME_24XXX_MCE;
......
...@@ -113,8 +113,7 @@ static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st) ...@@ -113,8 +113,7 @@ static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st)
static void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg) static void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg)
{ {
pvr2_trace(PVR2_TRACE_INFO, pvr2_trace(PVR2_TRACE_INFO,
"buffer%s%s %p state=%s id=%d status=%d" "buffer%s%s %p state=%s id=%d status=%d stream=%p purb=%p sig=0x%x",
" stream=%p purb=%p sig=0x%x",
(msg ? " " : ""), (msg ? " " : ""),
(msg ? msg : ""), (msg ? msg : ""),
bp, bp,
...@@ -156,8 +155,7 @@ static void pvr2_buffer_remove(struct pvr2_buffer *bp) ...@@ -156,8 +155,7 @@ static void pvr2_buffer_remove(struct pvr2_buffer *bp)
(*cnt)--; (*cnt)--;
(*bcnt) -= ccnt; (*bcnt) -= ccnt;
pvr2_trace(PVR2_TRACE_BUF_FLOW, pvr2_trace(PVR2_TRACE_BUF_FLOW,
"/*---TRACE_FLOW---*/" "/*---TRACE_FLOW---*/ bufferPool %8s dec cap=%07d cnt=%02d",
" bufferPool %8s dec cap=%07d cnt=%02d",
pvr2_buffer_state_decode(bp->state),*bcnt,*cnt); pvr2_buffer_state_decode(bp->state),*bcnt,*cnt);
bp->state = pvr2_buffer_state_none; bp->state = pvr2_buffer_state_none;
} }
...@@ -198,8 +196,7 @@ static int pvr2_buffer_set_ready(struct pvr2_buffer *bp) ...@@ -198,8 +196,7 @@ static int pvr2_buffer_set_ready(struct pvr2_buffer *bp)
(sp->r_count)++; (sp->r_count)++;
sp->r_bcount += bp->used_count; sp->r_bcount += bp->used_count;
pvr2_trace(PVR2_TRACE_BUF_FLOW, pvr2_trace(PVR2_TRACE_BUF_FLOW,
"/*---TRACE_FLOW---*/" "/*---TRACE_FLOW---*/ bufferPool %8s inc cap=%07d cnt=%02d",
" bufferPool %8s inc cap=%07d cnt=%02d",
pvr2_buffer_state_decode(bp->state), pvr2_buffer_state_decode(bp->state),
sp->r_bcount,sp->r_count); sp->r_bcount,sp->r_count);
spin_unlock_irqrestore(&sp->list_lock,irq_flags); spin_unlock_irqrestore(&sp->list_lock,irq_flags);
...@@ -224,8 +221,7 @@ static void pvr2_buffer_set_idle(struct pvr2_buffer *bp) ...@@ -224,8 +221,7 @@ static void pvr2_buffer_set_idle(struct pvr2_buffer *bp)
(sp->i_count)++; (sp->i_count)++;
sp->i_bcount += bp->max_count; sp->i_bcount += bp->max_count;
pvr2_trace(PVR2_TRACE_BUF_FLOW, pvr2_trace(PVR2_TRACE_BUF_FLOW,
"/*---TRACE_FLOW---*/" "/*---TRACE_FLOW---*/ bufferPool %8s inc cap=%07d cnt=%02d",
" bufferPool %8s inc cap=%07d cnt=%02d",
pvr2_buffer_state_decode(bp->state), pvr2_buffer_state_decode(bp->state),
sp->i_bcount,sp->i_count); sp->i_bcount,sp->i_count);
spin_unlock_irqrestore(&sp->list_lock,irq_flags); spin_unlock_irqrestore(&sp->list_lock,irq_flags);
...@@ -249,8 +245,7 @@ static void pvr2_buffer_set_queued(struct pvr2_buffer *bp) ...@@ -249,8 +245,7 @@ static void pvr2_buffer_set_queued(struct pvr2_buffer *bp)
(sp->q_count)++; (sp->q_count)++;
sp->q_bcount += bp->max_count; sp->q_bcount += bp->max_count;
pvr2_trace(PVR2_TRACE_BUF_FLOW, pvr2_trace(PVR2_TRACE_BUF_FLOW,
"/*---TRACE_FLOW---*/" "/*---TRACE_FLOW---*/ bufferPool %8s inc cap=%07d cnt=%02d",
" bufferPool %8s inc cap=%07d cnt=%02d",
pvr2_buffer_state_decode(bp->state), pvr2_buffer_state_decode(bp->state),
sp->q_bcount,sp->q_count); sp->q_bcount,sp->q_count);
spin_unlock_irqrestore(&sp->list_lock,irq_flags); spin_unlock_irqrestore(&sp->list_lock,irq_flags);
...@@ -293,8 +288,8 @@ static void pvr2_buffer_done(struct pvr2_buffer *bp) ...@@ -293,8 +288,8 @@ static void pvr2_buffer_done(struct pvr2_buffer *bp)
bp->signature = 0; bp->signature = 0;
bp->stream = NULL; bp->stream = NULL;
usb_free_urb(bp->purb); usb_free_urb(bp->purb);
pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/" pvr2_trace(PVR2_TRACE_BUF_POOL, "/*---TRACE_FLOW---*/ bufferDone %p",
" bufferDone %p",bp); bp);
} }
static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt) static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt)
...@@ -306,8 +301,7 @@ static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt) ...@@ -306,8 +301,7 @@ static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt)
if (cnt == sp->buffer_total_count) return 0; if (cnt == sp->buffer_total_count) return 0;
pvr2_trace(PVR2_TRACE_BUF_POOL, pvr2_trace(PVR2_TRACE_BUF_POOL,
"/*---TRACE_FLOW---*/ poolResize " "/*---TRACE_FLOW---*/ poolResize stream=%p cur=%d adj=%+d",
" stream=%p cur=%d adj=%+d",
sp, sp,
sp->buffer_total_count, sp->buffer_total_count,
cnt-sp->buffer_total_count); cnt-sp->buffer_total_count);
...@@ -374,8 +368,7 @@ static int pvr2_stream_achieve_buffer_count(struct pvr2_stream *sp) ...@@ -374,8 +368,7 @@ static int pvr2_stream_achieve_buffer_count(struct pvr2_stream *sp)
if (sp->buffer_total_count == sp->buffer_target_count) return 0; if (sp->buffer_total_count == sp->buffer_target_count) return 0;
pvr2_trace(PVR2_TRACE_BUF_POOL, pvr2_trace(PVR2_TRACE_BUF_POOL,
"/*---TRACE_FLOW---*/" "/*---TRACE_FLOW---*/ poolCheck stream=%p cur=%d tgt=%d",
" poolCheck stream=%p cur=%d tgt=%d",
sp,sp->buffer_total_count,sp->buffer_target_count); sp,sp->buffer_total_count,sp->buffer_target_count);
if (sp->buffer_total_count < sp->buffer_target_count) { if (sp->buffer_total_count < sp->buffer_target_count) {
...@@ -454,8 +447,8 @@ static void buffer_complete(struct urb *urb) ...@@ -454,8 +447,8 @@ static void buffer_complete(struct urb *urb)
bp->used_count = urb->actual_length; bp->used_count = urb->actual_length;
if (sp->fail_count) { if (sp->fail_count) {
pvr2_trace(PVR2_TRACE_TOLERANCE, pvr2_trace(PVR2_TRACE_TOLERANCE,
"stream %p transfer ok" "stream %p transfer ok - fail count reset",
" - fail count reset",sp); sp);
sp->fail_count = 0; sp->fail_count = 0;
} }
} else if (sp->fail_count < sp->fail_tolerance) { } else if (sp->fail_count < sp->fail_tolerance) {
...@@ -464,8 +457,7 @@ static void buffer_complete(struct urb *urb) ...@@ -464,8 +457,7 @@ static void buffer_complete(struct urb *urb)
(sp->fail_count)++; (sp->fail_count)++;
(sp->buffers_failed)++; (sp->buffers_failed)++;
pvr2_trace(PVR2_TRACE_TOLERANCE, pvr2_trace(PVR2_TRACE_TOLERANCE,
"stream %p ignoring error %d" "stream %p ignoring error %d - fail count increased to %u",
" - fail count increased to %u",
sp,urb->status,sp->fail_count); sp,urb->status,sp->fail_count);
} else { } else {
(sp->buffers_failed)++; (sp->buffers_failed)++;
...@@ -666,8 +658,7 @@ int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt) ...@@ -666,8 +658,7 @@ int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt)
bp->max_count = cnt; bp->max_count = cnt;
bp->stream->i_bcount += bp->max_count; bp->stream->i_bcount += bp->max_count;
pvr2_trace(PVR2_TRACE_BUF_FLOW, pvr2_trace(PVR2_TRACE_BUF_FLOW,
"/*---TRACE_FLOW---*/ bufferPool " "/*---TRACE_FLOW---*/ bufferPool %8s cap cap=%07d cnt=%02d",
" %8s cap cap=%07d cnt=%02d",
pvr2_buffer_state_decode( pvr2_buffer_state_decode(
pvr2_buffer_state_idle), pvr2_buffer_state_idle),
bp->stream->i_bcount,bp->stream->i_count); bp->stream->i_bcount,bp->stream->i_count);
......
...@@ -169,9 +169,7 @@ static int pvr2_ioread_start(struct pvr2_ioread *cp) ...@@ -169,9 +169,7 @@ static int pvr2_ioread_start(struct pvr2_ioread *cp)
stat = pvr2_buffer_queue(bp); stat = pvr2_buffer_queue(bp);
if (stat < 0) { if (stat < 0) {
pvr2_trace(PVR2_TRACE_DATA_FLOW, pvr2_trace(PVR2_TRACE_DATA_FLOW,
"/*---TRACE_READ---*/" "/*---TRACE_READ---*/ pvr2_ioread_start id=%p error=%d",
" pvr2_ioread_start id=%p"
" error=%d",
cp,stat); cp,stat);
pvr2_ioread_stop(cp); pvr2_ioread_stop(cp);
return stat; return stat;
...@@ -209,8 +207,8 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp) ...@@ -209,8 +207,8 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp)
do { do {
if (cp->stream) { if (cp->stream) {
pvr2_trace(PVR2_TRACE_START_STOP, pvr2_trace(PVR2_TRACE_START_STOP,
"/*---TRACE_READ---*/" "/*---TRACE_READ---*/ pvr2_ioread_setup (tear-down) id=%p",
" pvr2_ioread_setup (tear-down) id=%p",cp); cp);
pvr2_ioread_stop(cp); pvr2_ioread_stop(cp);
pvr2_stream_kill(cp->stream); pvr2_stream_kill(cp->stream);
if (pvr2_stream_get_buffer_count(cp->stream)) { if (pvr2_stream_get_buffer_count(cp->stream)) {
...@@ -220,8 +218,8 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp) ...@@ -220,8 +218,8 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp)
} }
if (sp) { if (sp) {
pvr2_trace(PVR2_TRACE_START_STOP, pvr2_trace(PVR2_TRACE_START_STOP,
"/*---TRACE_READ---*/" "/*---TRACE_READ---*/ pvr2_ioread_setup (setup) id=%p",
" pvr2_ioread_setup (setup) id=%p",cp); cp);
pvr2_stream_kill(sp); pvr2_stream_kill(sp);
ret = pvr2_stream_set_buffer_count(sp,BUFFER_COUNT); ret = pvr2_stream_set_buffer_count(sp,BUFFER_COUNT);
if (ret < 0) { if (ret < 0) {
...@@ -270,9 +268,7 @@ static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) ...@@ -270,9 +268,7 @@ static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp)
if (stat < 0) { if (stat < 0) {
// Streaming error... // Streaming error...
pvr2_trace(PVR2_TRACE_DATA_FLOW, pvr2_trace(PVR2_TRACE_DATA_FLOW,
"/*---TRACE_READ---*/" "/*---TRACE_READ---*/ pvr2_ioread_read id=%p queue_error=%d",
" pvr2_ioread_read id=%p"
" queue_error=%d",
cp,stat); cp,stat);
pvr2_ioread_stop(cp); pvr2_ioread_stop(cp);
return 0; return 0;
...@@ -292,9 +288,7 @@ static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) ...@@ -292,9 +288,7 @@ static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp)
if (stat < 0) { if (stat < 0) {
// Streaming error... // Streaming error...
pvr2_trace(PVR2_TRACE_DATA_FLOW, pvr2_trace(PVR2_TRACE_DATA_FLOW,
"/*---TRACE_READ---*/" "/*---TRACE_READ---*/ pvr2_ioread_read id=%p buffer_error=%d",
" pvr2_ioread_read id=%p"
" buffer_error=%d",
cp,stat); cp,stat);
pvr2_ioread_stop(cp); pvr2_ioread_stop(cp);
// Give up. // Give up.
...@@ -347,8 +341,7 @@ static void pvr2_ioread_filter(struct pvr2_ioread *cp) ...@@ -347,8 +341,7 @@ static void pvr2_ioread_filter(struct pvr2_ioread *cp)
if (cp->sync_buf_offs >= cp->sync_key_len) { if (cp->sync_buf_offs >= cp->sync_key_len) {
cp->sync_trashed_count -= cp->sync_key_len; cp->sync_trashed_count -= cp->sync_key_len;
pvr2_trace(PVR2_TRACE_DATA_FLOW, pvr2_trace(PVR2_TRACE_DATA_FLOW,
"/*---TRACE_READ---*/" "/*---TRACE_READ---*/ sync_state <== 2 (skipped %u bytes)",
" sync_state <== 2 (skipped %u bytes)",
cp->sync_trashed_count); cp->sync_trashed_count);
cp->sync_state = 2; cp->sync_state = 2;
cp->sync_buf_offs = 0; cp->sync_buf_offs = 0;
...@@ -358,8 +351,7 @@ static void pvr2_ioread_filter(struct pvr2_ioread *cp) ...@@ -358,8 +351,7 @@ static void pvr2_ioread_filter(struct pvr2_ioread *cp)
if (cp->c_data_offs < cp->c_data_len) { if (cp->c_data_offs < cp->c_data_len) {
// Sanity check - should NEVER get here // Sanity check - should NEVER get here
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"ERROR: pvr2_ioread filter sync problem" "ERROR: pvr2_ioread filter sync problem len=%u offs=%u",
" len=%u offs=%u",
cp->c_data_len,cp->c_data_offs); cp->c_data_len,cp->c_data_offs);
// Get out so we don't get stuck in an infinite // Get out so we don't get stuck in an infinite
// loop. // loop.
...@@ -418,8 +410,8 @@ int pvr2_ioread_read(struct pvr2_ioread *cp,void __user *buf,unsigned int cnt) ...@@ -418,8 +410,8 @@ int pvr2_ioread_read(struct pvr2_ioread *cp,void __user *buf,unsigned int cnt)
if (!cnt) { if (!cnt) {
pvr2_trace(PVR2_TRACE_TRAP, pvr2_trace(PVR2_TRACE_TRAP,
"/*---TRACE_READ---*/ pvr2_ioread_read id=%p" "/*---TRACE_READ---*/ pvr2_ioread_read id=%p ZERO Request? Returning zero.",
" ZERO Request? Returning zero.",cp); cp);
return 0; return 0;
} }
...@@ -477,8 +469,7 @@ int pvr2_ioread_read(struct pvr2_ioread *cp,void __user *buf,unsigned int cnt) ...@@ -477,8 +469,7 @@ int pvr2_ioread_read(struct pvr2_ioread *cp,void __user *buf,unsigned int cnt)
// Consumed entire key; switch mode // Consumed entire key; switch mode
// to normal. // to normal.
pvr2_trace(PVR2_TRACE_DATA_FLOW, pvr2_trace(PVR2_TRACE_DATA_FLOW,
"/*---TRACE_READ---*/" "/*---TRACE_READ---*/ sync_state <== 0");
" sync_state <== 0");
cp->sync_state = 0; cp->sync_state = 0;
} }
} else { } else {
...@@ -502,8 +493,7 @@ int pvr2_ioread_read(struct pvr2_ioread *cp,void __user *buf,unsigned int cnt) ...@@ -502,8 +493,7 @@ int pvr2_ioread_read(struct pvr2_ioread *cp,void __user *buf,unsigned int cnt)
} }
pvr2_trace(PVR2_TRACE_DATA_FLOW, pvr2_trace(PVR2_TRACE_DATA_FLOW,
"/*---TRACE_READ---*/ pvr2_ioread_read" "/*---TRACE_READ---*/ pvr2_ioread_read id=%p request=%d result=%d",
" id=%p request=%d result=%d",
cp,req_cnt,ret); cp,req_cnt,ret);
return ret; return ret;
} }
...@@ -357,8 +357,7 @@ struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr, ...@@ -357,8 +357,7 @@ struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr,
bcnt = pvr2_std_id_to_str(buf,sizeof(buf),fmsk); bcnt = pvr2_std_id_to_str(buf,sizeof(buf),fmsk);
pvr2_trace( pvr2_trace(
PVR2_TRACE_ERROR_LEGS, PVR2_TRACE_ERROR_LEGS,
"WARNING:" "WARNING: Failed to classify the following standard(s): %.*s",
" Failed to classify the following standard(s): %.*s",
bcnt,buf); bcnt,buf);
} }
......
...@@ -949,8 +949,8 @@ static long pvr2_v4l2_ioctl(struct file *file, ...@@ -949,8 +949,8 @@ static long pvr2_v4l2_ioctl(struct file *file,
if (ret < 0) { if (ret < 0) {
if (pvrusb2_debug & PVR2_TRACE_V4LIOCTL) { if (pvrusb2_debug & PVR2_TRACE_V4LIOCTL) {
pvr2_trace(PVR2_TRACE_V4LIOCTL, pvr2_trace(PVR2_TRACE_V4LIOCTL,
"pvr2_v4l2_do_ioctl failure, ret=%ld" "pvr2_v4l2_do_ioctl failure, ret=%ld command was:",
" command was:", ret); ret);
v4l_printk_ioctl(pvr2_hdw_get_driver_name(hdw), cmd); v4l_printk_ioctl(pvr2_hdw_get_driver_name(hdw), cmd);
} }
} else { } else {
...@@ -1254,8 +1254,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip, ...@@ -1254,8 +1254,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
nr_ptr = video_nr; nr_ptr = video_nr;
if (!dip->stream) { if (!dip->stream) {
pr_err(KBUILD_MODNAME pr_err(KBUILD_MODNAME
": Failed to set up pvrusb2 v4l video dev" ": Failed to set up pvrusb2 v4l video dev due to missing stream instance\n");
" due to missing stream instance\n");
return; return;
} }
break; break;
...@@ -1272,8 +1271,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip, ...@@ -1272,8 +1271,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
break; break;
default: default:
/* Bail out (this should be impossible) */ /* Bail out (this should be impossible) */
pr_err(KBUILD_MODNAME ": Failed to set up pvrusb2 v4l dev" pr_err(KBUILD_MODNAME ": Failed to set up pvrusb2 v4l dev due to unrecognized config\n");
" due to unrecognized config\n");
return; return;
} }
......
...@@ -91,9 +91,7 @@ void pvr2_saa7115_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) ...@@ -91,9 +91,7 @@ void pvr2_saa7115_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
(hdw->input_val < 0) || (hdw->input_val < 0) ||
(hdw->input_val >= sp->cnt)) { (hdw->input_val >= sp->cnt)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS, pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"*** WARNING *** subdev v4l2 set_input:" "*** WARNING *** subdev v4l2 set_input: Invalid routing scheme (%u) and/or input (%d)",
" Invalid routing scheme (%u)"
" and/or input (%d)",
sid, hdw->input_val); sid, hdw->input_val);
return; return;
} }
......
...@@ -49,8 +49,7 @@ void pvr2_wm8775_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) ...@@ -49,8 +49,7 @@ void pvr2_wm8775_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
input = 2; input = 2;
break; break;
} }
pvr2_trace(PVR2_TRACE_CHIPS, "subdev wm8775" pvr2_trace(PVR2_TRACE_CHIPS, "subdev wm8775 set_input(val=%d route=0x%x)",
" set_input(val=%d route=0x%x)",
hdw->input_val, input); hdw->input_val, input);
sd->ops->audio->s_routing(sd, input, 0, 0); sd->ops->audio->s_routing(sd, input, 0, 0);
......
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