summaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners/xc4000.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-18 17:44:26 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-21 10:08:13 -0200
commit8ca2e927eb29cdfb67439b5894307e7d3872f2ee (patch)
tree91b4b3946b56273819d682f76377a7ebed1090ba /drivers/media/tuners/xc4000.c
parent25ec587c02c3008ead4046a998eb412ce41c72ec (diff)
downloadop-kernel-dev-8ca2e927eb29cdfb67439b5894307e7d3872f2ee.zip
op-kernel-dev-8ca2e927eb29cdfb67439b5894307e7d3872f2ee.tar.gz
[media] tuners: 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: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/tuners/xc4000.c')
-rw-r--r--drivers/media/tuners/xc4000.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/media/tuners/xc4000.c b/drivers/media/tuners/xc4000.c
index d95c7e0..ac98dea 100644
--- a/drivers/media/tuners/xc4000.c
+++ b/drivers/media/tuners/xc4000.c
@@ -43,14 +43,11 @@ MODULE_PARM_DESC(debug, "Debugging level (0 to 2, default: 0 (off)).");
static int no_poweroff;
module_param(no_poweroff, int, 0644);
-MODULE_PARM_DESC(no_poweroff, "Power management (1: disabled, 2: enabled, "
- "0 (default): use device-specific default mode).");
+MODULE_PARM_DESC(no_poweroff, "Power management (1: disabled, 2: enabled, 0 (default): use device-specific default mode).");
static int audio_std;
module_param(audio_std, int, 0644);
-MODULE_PARM_DESC(audio_std, "Audio standard. XC4000 audio decoder explicitly "
- "needs to know what audio standard is needed for some video standards "
- "with audio A2 or NICAM. The valid settings are a sum of:\n"
+MODULE_PARM_DESC(audio_std, "Audio standard. XC4000 audio decoder explicitly needs to know what audio standard is needed for some video standards with audio A2 or NICAM. The valid settings are a sum of:\n"
" 1: use NICAM/B or A2/B instead of NICAM/A or A2/A\n"
" 2: use A2 instead of NICAM or BTSC\n"
" 4: use SECAM/K3 instead of K1\n"
@@ -60,8 +57,7 @@ MODULE_PARM_DESC(audio_std, "Audio standard. XC4000 audio decoder explicitly "
static char firmware_name[30];
module_param_string(firmware_name, firmware_name, sizeof(firmware_name), 0);
-MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the "
- "default firmware name.");
+MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the default firmware name.");
static DEFINE_MUTEX(xc4000_list_mutex);
static LIST_HEAD(hybrid_tuner_instance_list);
@@ -290,8 +286,7 @@ static int xc4000_tuner_reset(struct dvb_frontend *fe)
return -EREMOTEIO;
}
} else {
- printk(KERN_ERR "xc4000: no tuner reset callback function, "
- "fatal\n");
+ printk(KERN_ERR "xc4000: no tuner reset callback function, fatal\n");
return -EINVAL;
}
return 0;
@@ -679,8 +674,7 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
if (best_nr_diffs > 0U) {
printk(KERN_WARNING
- "Selecting best matching firmware (%u bits differ) for "
- "type=(%x), id %016llx:\n",
+ "Selecting best matching firmware (%u bits differ) for type=(%x), id %016llx:\n",
best_nr_diffs, type, (unsigned long long)*id);
i = best_i;
}
@@ -800,8 +794,7 @@ static int xc4000_fwupload(struct dvb_frontend *fe)
n++;
if (n >= n_array) {
- printk(KERN_ERR "More firmware images in file than "
- "were expected!\n");
+ printk(KERN_ERR "More firmware images in file than were expected!\n");
goto corrupt;
}
@@ -1055,8 +1048,7 @@ check_device:
goto fail;
}
- dprintk(1, "Device is Xceive %d version %d.%d, "
- "firmware version %d.%d\n",
+ dprintk(1, "Device is Xceive %d version %d.%d, firmware version %d.%d\n",
hwmodel, hw_major, hw_minor, fw_major, fw_minor);
/* Check firmware version against what we downloaded. */
@@ -1076,8 +1068,7 @@ check_device:
} else if (priv->hwmodel == 0 || priv->hwmodel != hwmodel ||
priv->hwvers != ((hw_major << 8) | hw_minor)) {
printk(KERN_WARNING
- "Read invalid device hardware information - tuner "
- "hung?\n");
+ "Read invalid device hardware information - tuner hung?\n");
goto fail;
}
OpenPOWER on IntegriCloud