Commit 395eff95 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] saa7134: 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 2d96b44f
...@@ -813,8 +813,7 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream) ...@@ -813,8 +813,7 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
int amux, err; int amux, err;
if (!saa7134) { if (!saa7134) {
pr_err("BUG: saa7134 can't find device struct." pr_err("BUG: saa7134 can't find device struct. Can't proceed with open\n");
" Can't proceed with open\n");
return -ENODEV; return -ENODEV;
} }
dev = saa7134->dev; dev = saa7134->dev;
......
...@@ -7341,8 +7341,8 @@ static void hauppauge_eeprom(struct saa7134_dev *dev, u8 *eeprom_data) ...@@ -7341,8 +7341,8 @@ static void hauppauge_eeprom(struct saa7134_dev *dev, u8 *eeprom_data)
case 67659: /* WinTV-HVR1110 (OEM, no IR, hybrid, FM, SVid/Comp, RCA aud) */ case 67659: /* WinTV-HVR1110 (OEM, no IR, hybrid, FM, SVid/Comp, RCA aud) */
break; break;
default: default:
pr_warn("%s: warning: " pr_warn("%s: warning: unknown hauppauge model #%d\n",
"unknown hauppauge model #%d\n", dev->name, tv.model); dev->name, tv.model);
break; break;
} }
...@@ -7920,8 +7920,8 @@ int saa7134_board_init2(struct saa7134_dev *dev) ...@@ -7920,8 +7920,8 @@ int saa7134_board_init2(struct saa7134_dev *dev)
msg.addr = 0x0b; msg.addr = 0x0b;
msg.len = 1; msg.len = 1;
if (1 != i2c_transfer(&dev->i2c_adap, &msg, 1)) { if (1 != i2c_transfer(&dev->i2c_adap, &msg, 1)) {
pr_warn("%s: send wake up byte to pic16C505" pr_warn("%s: send wake up byte to pic16C505(IR chip) failed\n",
"(IR chip) failed\n", dev->name); dev->name);
} else { } else {
msg.flags = I2C_M_RD; msg.flags = I2C_M_RD;
rc = i2c_transfer(&dev->i2c_adap, &msg, 1); rc = i2c_transfer(&dev->i2c_adap, &msg, 1);
......
...@@ -66,8 +66,7 @@ MODULE_PARM_DESC(latency,"pci latency timer"); ...@@ -66,8 +66,7 @@ MODULE_PARM_DESC(latency,"pci latency timer");
int saa7134_no_overlay=-1; int saa7134_no_overlay=-1;
module_param_named(no_overlay, saa7134_no_overlay, int, 0444); module_param_named(no_overlay, saa7134_no_overlay, int, 0444);
MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)" MODULE_PARM_DESC(no_overlay, "allow override overlay default (0 disables, 1 enables) [some VIA/SIS chipsets are known to have problem with overlay]");
" [some VIA/SIS chipsets are known to have problem with overlay]");
bool saa7134_userptr; bool saa7134_userptr;
module_param(saa7134_userptr, bool, 0644); module_param(saa7134_userptr, bool, 0644);
...@@ -619,25 +618,25 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id) ...@@ -619,25 +618,25 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id)
print_irqstatus(dev,loop,report,status); print_irqstatus(dev,loop,report,status);
if (report & SAA7134_IRQ_REPORT_PE) { if (report & SAA7134_IRQ_REPORT_PE) {
/* disable all parity error */ /* disable all parity error */
pr_warn("%s/irq: looping -- " pr_warn("%s/irq: looping -- clearing PE (parity error!) enable bit\n",
"clearing PE (parity error!) enable bit\n",dev->name); dev->name);
saa_clearl(SAA7134_IRQ2,SAA7134_IRQ2_INTE_PE); saa_clearl(SAA7134_IRQ2,SAA7134_IRQ2_INTE_PE);
} else if (report & SAA7134_IRQ_REPORT_GPIO16) { } else if (report & SAA7134_IRQ_REPORT_GPIO16) {
/* disable gpio16 IRQ */ /* disable gpio16 IRQ */
pr_warn("%s/irq: looping -- " pr_warn("%s/irq: looping -- clearing GPIO16 enable bit\n",
"clearing GPIO16 enable bit\n",dev->name); dev->name);
saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO16_P); saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO16_P);
saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO16_N); saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO16_N);
} else if (report & SAA7134_IRQ_REPORT_GPIO18) { } else if (report & SAA7134_IRQ_REPORT_GPIO18) {
/* disable gpio18 IRQs */ /* disable gpio18 IRQs */
pr_warn("%s/irq: looping -- " pr_warn("%s/irq: looping -- clearing GPIO18 enable bit\n",
"clearing GPIO18 enable bit\n",dev->name); dev->name);
saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO18_P); saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO18_P);
saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO18_N); saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO18_N);
} else { } else {
/* disable all irqs */ /* disable all irqs */
pr_warn("%s/irq: looping -- " pr_warn("%s/irq: looping -- clearing all enable bits\n",
"clearing all enable bits\n",dev->name); dev->name);
saa_writel(SAA7134_IRQ1,0); saa_writel(SAA7134_IRQ1,0);
saa_writel(SAA7134_IRQ2,0); saa_writel(SAA7134_IRQ2,0);
} }
...@@ -1081,18 +1080,14 @@ static int saa7134_initdev(struct pci_dev *pci_dev, ...@@ -1081,18 +1080,14 @@ static int saa7134_initdev(struct pci_dev *pci_dev,
} }
#endif #endif
if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) { if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) {
pr_info("%s: quirk: this driver and your " pr_info("%s: quirk: this driver and your chipset may not work together in overlay mode.\n",
"chipset may not work together" dev->name);
" in overlay mode.\n",dev->name);
if (!saa7134_no_overlay) { if (!saa7134_no_overlay) {
pr_info("%s: quirk: overlay " pr_info("%s: quirk: overlay mode will be disabled.\n",
"mode will be disabled.\n",
dev->name); dev->name);
saa7134_no_overlay = 1; saa7134_no_overlay = 1;
} else { } else {
pr_info("%s: quirk: overlay " pr_info("%s: quirk: overlay mode will be forced. Use this option at your own risk.\n",
"mode will be forced. Use this"
" option at your own risk.\n",
dev->name); dev->name);
} }
} }
...@@ -1106,10 +1101,10 @@ static int saa7134_initdev(struct pci_dev *pci_dev, ...@@ -1106,10 +1101,10 @@ static int saa7134_initdev(struct pci_dev *pci_dev,
/* print pci info */ /* print pci info */
dev->pci_rev = pci_dev->revision; dev->pci_rev = pci_dev->revision;
pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat); pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat);
pr_info("%s: found at %s, rev: %d, irq: %d, " pr_info("%s: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n",
"latency: %d, mmio: 0x%llx\n", dev->name, dev->name, pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
pci_name(pci_dev), dev->pci_rev, pci_dev->irq, dev->pci_lat,
dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); (unsigned long long)pci_resource_start(pci_dev, 0));
pci_set_master(pci_dev); pci_set_master(pci_dev);
err = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32)); err = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32));
if (err) { if (err) {
......
...@@ -1449,8 +1449,8 @@ static int dvb_init(struct saa7134_dev *dev) ...@@ -1449,8 +1449,8 @@ static int dvb_init(struct saa7134_dev *dev)
if (dvb_attach(tda826x_attach, fe0->dvb.frontend, if (dvb_attach(tda826x_attach, fe0->dvb.frontend,
0x60, &dev->i2c_adap, 0) == NULL) { 0x60, &dev->i2c_adap, 0) == NULL) {
pr_warn("%s: Medion Quadro, no tda826x " pr_warn("%s: Medion Quadro, no tda826x found !\n",
"found !\n", __func__); __func__);
goto detach_frontend; goto detach_frontend;
} }
if (dev_id != 0x08) { if (dev_id != 0x08) {
...@@ -1458,8 +1458,8 @@ static int dvb_init(struct saa7134_dev *dev) ...@@ -1458,8 +1458,8 @@ static int dvb_init(struct saa7134_dev *dev)
fe->ops.i2c_gate_ctrl(fe, 1); fe->ops.i2c_gate_ctrl(fe, 1);
if (dvb_attach(isl6405_attach, fe, if (dvb_attach(isl6405_attach, fe,
&dev->i2c_adap, 0x08, 0, 0) == NULL) { &dev->i2c_adap, 0x08, 0, 0) == NULL) {
pr_warn("%s: Medion Quadro, no ISL6405 " pr_warn("%s: Medion Quadro, no ISL6405 found !\n",
"found !\n", __func__); __func__);
goto detach_frontend; goto detach_frontend;
} }
if (dev_id == 0x07) { if (dev_id == 0x07) {
...@@ -1629,8 +1629,8 @@ static int dvb_init(struct saa7134_dev *dev) ...@@ -1629,8 +1629,8 @@ static int dvb_init(struct saa7134_dev *dev)
struct dvb_frontend *fe; struct dvb_frontend *fe;
if (dvb_attach(dvb_pll_attach, fe0->dvb.frontend, 0x60, if (dvb_attach(dvb_pll_attach, fe0->dvb.frontend, 0x60,
&dev->i2c_adap, DVB_PLL_PHILIPS_SD1878_TDA8261) == NULL) { &dev->i2c_adap, DVB_PLL_PHILIPS_SD1878_TDA8261) == NULL) {
pr_warn("%s: MD7134 DVB-S, no SD1878 " pr_warn("%s: MD7134 DVB-S, no SD1878 found !\n",
"found !\n", __func__); __func__);
goto detach_frontend; goto detach_frontend;
} }
/* we need to open the i2c gate (we know it exists) */ /* we need to open the i2c gate (we know it exists) */
...@@ -1638,8 +1638,8 @@ static int dvb_init(struct saa7134_dev *dev) ...@@ -1638,8 +1638,8 @@ static int dvb_init(struct saa7134_dev *dev)
fe->ops.i2c_gate_ctrl(fe, 1); fe->ops.i2c_gate_ctrl(fe, 1);
if (dvb_attach(isl6405_attach, fe, if (dvb_attach(isl6405_attach, fe,
&dev->i2c_adap, 0x08, 0, 0) == NULL) { &dev->i2c_adap, 0x08, 0, 0) == NULL) {
pr_warn("%s: MD7134 DVB-S, no ISL6405 " pr_warn("%s: MD7134 DVB-S, no ISL6405 found !\n",
"found !\n", __func__); __func__);
goto detach_frontend; goto detach_frontend;
} }
fe->ops.i2c_gate_ctrl(fe, 0); fe->ops.i2c_gate_ctrl(fe, 0);
...@@ -1670,14 +1670,14 @@ static int dvb_init(struct saa7134_dev *dev) ...@@ -1670,14 +1670,14 @@ static int dvb_init(struct saa7134_dev *dev)
if (dvb_attach(tda826x_attach, if (dvb_attach(tda826x_attach,
fe0->dvb.frontend, 0x60, fe0->dvb.frontend, 0x60,
&dev->i2c_adap, 0) == NULL) { &dev->i2c_adap, 0) == NULL) {
pr_warn("%s: Asus Tiger 3in1, no " pr_warn("%s: Asus Tiger 3in1, no tda826x found!\n",
"tda826x found!\n", __func__); __func__);
goto detach_frontend; goto detach_frontend;
} }
if (dvb_attach(lnbp21_attach, fe0->dvb.frontend, if (dvb_attach(lnbp21_attach, fe0->dvb.frontend,
&dev->i2c_adap, 0, 0) == NULL) { &dev->i2c_adap, 0, 0) == NULL) {
pr_warn("%s: Asus Tiger 3in1, no lnbp21" pr_warn("%s: Asus Tiger 3in1, no lnbp21 found!\n",
" found!\n", __func__); __func__);
goto detach_frontend; goto detach_frontend;
} }
} }
...@@ -1695,14 +1695,14 @@ static int dvb_init(struct saa7134_dev *dev) ...@@ -1695,14 +1695,14 @@ static int dvb_init(struct saa7134_dev *dev)
if (dvb_attach(tda826x_attach, if (dvb_attach(tda826x_attach,
fe0->dvb.frontend, 0x60, fe0->dvb.frontend, 0x60,
&dev->i2c_adap, 0) == NULL) { &dev->i2c_adap, 0) == NULL) {
pr_warn("%s: Asus My Cinema PS3-100, no " pr_warn("%s: Asus My Cinema PS3-100, no tda826x found!\n",
"tda826x found!\n", __func__); __func__);
goto detach_frontend; goto detach_frontend;
} }
if (dvb_attach(lnbp21_attach, fe0->dvb.frontend, if (dvb_attach(lnbp21_attach, fe0->dvb.frontend,
&dev->i2c_adap, 0, 0) == NULL) { &dev->i2c_adap, 0, 0) == NULL) {
pr_warn("%s: Asus My Cinema PS3-100, no lnbp21" pr_warn("%s: Asus My Cinema PS3-100, no lnbp21 found!\n",
" found!\n", __func__); __func__);
goto detach_frontend; goto detach_frontend;
} }
} }
......
...@@ -123,8 +123,7 @@ static int get_key_flydvb_trio(struct IR_i2c *ir, enum rc_type *protocol, ...@@ -123,8 +123,7 @@ static int get_key_flydvb_trio(struct IR_i2c *ir, enum rc_type *protocol,
struct saa7134_dev *dev = ir->c->adapter->algo_data; struct saa7134_dev *dev = ir->c->adapter->algo_data;
if (dev == NULL) { if (dev == NULL) {
ir_dbg(ir, "get_key_flydvb_trio: " ir_dbg(ir, "get_key_flydvb_trio: ir->c->adapter->algo_data is NULL!\n");
"ir->c->adapter->algo_data is NULL!\n");
return -EIO; return -EIO;
} }
...@@ -150,8 +149,8 @@ static int get_key_flydvb_trio(struct IR_i2c *ir, enum rc_type *protocol, ...@@ -150,8 +149,8 @@ static int get_key_flydvb_trio(struct IR_i2c *ir, enum rc_type *protocol,
msleep(10); msleep(10);
continue; continue;
} }
ir_dbg(ir, "send wake up byte to pic16C505 (IR chip)" ir_dbg(ir, "send wake up byte to pic16C505 (IR chip)failed %dx\n",
"failed %dx\n", attempt); attempt);
return -EIO; return -EIO;
} }
if (1 != i2c_master_recv(ir->c, &b, 1)) { if (1 != i2c_master_recv(ir->c, &b, 1)) {
...@@ -174,8 +173,7 @@ static int get_key_msi_tvanywhere_plus(struct IR_i2c *ir, enum rc_type *protocol ...@@ -174,8 +173,7 @@ static int get_key_msi_tvanywhere_plus(struct IR_i2c *ir, enum rc_type *protocol
/* <dev> is needed to access GPIO. Used by the saa_readl macro. */ /* <dev> is needed to access GPIO. Used by the saa_readl macro. */
struct saa7134_dev *dev = ir->c->adapter->algo_data; struct saa7134_dev *dev = ir->c->adapter->algo_data;
if (dev == NULL) { if (dev == NULL) {
ir_dbg(ir, "get_key_msi_tvanywhere_plus: " ir_dbg(ir, "get_key_msi_tvanywhere_plus: ir->c->adapter->algo_data is NULL!\n");
"ir->c->adapter->algo_data is NULL!\n");
return -EIO; return -EIO;
} }
...@@ -223,8 +221,7 @@ static int get_key_kworld_pc150u(struct IR_i2c *ir, enum rc_type *protocol, ...@@ -223,8 +221,7 @@ static int get_key_kworld_pc150u(struct IR_i2c *ir, enum rc_type *protocol,
/* <dev> is needed to access GPIO. Used by the saa_readl macro. */ /* <dev> is needed to access GPIO. Used by the saa_readl macro. */
struct saa7134_dev *dev = ir->c->adapter->algo_data; struct saa7134_dev *dev = ir->c->adapter->algo_data;
if (dev == NULL) { if (dev == NULL) {
ir_dbg(ir, "get_key_kworld_pc150u: " ir_dbg(ir, "get_key_kworld_pc150u: ir->c->adapter->algo_data is NULL!\n");
"ir->c->adapter->algo_data is NULL!\n");
return -EIO; return -EIO;
} }
......
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