Commit 3f0bfe5b authored by Leonid V. Fedorenchik's avatar Leonid V. Fedorenchik Committed by Mauro Carvalho Chehab

[media] cx25821-core.c: Change line endings

Change obscure line endings to less obscure ones. (improve readability)
Signed-off-by: default avatarLeonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c14ea5e5
...@@ -804,8 +804,8 @@ void cx25821_set_pixel_format(struct cx25821_dev *dev, int channel_select, ...@@ -804,8 +804,8 @@ void cx25821_set_pixel_format(struct cx25821_dev *dev, int channel_select,
u32 format) u32 format)
{ {
if (channel_select <= 7 && channel_select >= 0) { if (channel_select <= 7 && channel_select >= 0) {
cx_write(dev->channels[channel_select]. cx_write(dev->channels[channel_select].sram_channels->pix_frmt,
sram_channels->pix_frmt, format); format);
dev->channels[channel_select].pixel_formats = format; dev->channels[channel_select].pixel_formats = format;
} }
} }
...@@ -855,17 +855,15 @@ static void cx25821_initialize(struct cx25821_dev *dev) ...@@ -855,17 +855,15 @@ static void cx25821_initialize(struct cx25821_dev *dev)
} }
cx25821_sram_channel_setup_audio(dev, cx25821_sram_channel_setup_audio(dev,
dev->channels[SRAM_CH08].sram_channels, dev->channels[SRAM_CH08].sram_channels, 128, 0);
128, 0);
cx25821_gpio_init(dev); cx25821_gpio_init(dev);
} }
static int cx25821_get_resources(struct cx25821_dev *dev) static int cx25821_get_resources(struct cx25821_dev *dev)
{ {
if (request_mem_region if (request_mem_region(pci_resource_start(dev->pci, 0),
(pci_resource_start(dev->pci, 0), pci_resource_len(dev->pci, 0), pci_resource_len(dev->pci, 0), dev->name))
dev->name))
return 0; return 0;
pr_err("%s: can't get MMIO memory @ 0x%llx\n", pr_err("%s: can't get MMIO memory @ 0x%llx\n",
...@@ -972,8 +970,7 @@ static int cx25821_dev_setup(struct cx25821_dev *dev) ...@@ -972,8 +970,7 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)
dev->lmmio = ioremap(dev->base_io_addr, pci_resource_len(dev->pci, 0)); dev->lmmio = ioremap(dev->base_io_addr, pci_resource_len(dev->pci, 0));
if (!dev->lmmio) { if (!dev->lmmio) {
CX25821_ERR CX25821_ERR("ioremap failed, maybe increasing __VMALLOC_RESERVE in page.h\n");
("ioremap failed, maybe increasing __VMALLOC_RESERVE in page.h\n");
cx25821_iounmap(dev); cx25821_iounmap(dev);
return -ENOMEM; return -ENOMEM;
} }
...@@ -1004,9 +1001,8 @@ static int cx25821_dev_setup(struct cx25821_dev *dev) ...@@ -1004,9 +1001,8 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)
cx25821_video_register(dev); cx25821_video_register(dev);
/* register IOCTL device */ /* register IOCTL device */
dev->ioctl_dev = dev->ioctl_dev = cx25821_vdev_init(dev, dev->pci,
cx25821_vdev_init(dev, dev->pci, &cx25821_videoioctl_template, &cx25821_videoioctl_template, "video");
"video");
if (video_register_device if (video_register_device
(dev->ioctl_dev, VFL_TYPE_GRABBER, VIDEO_IOCTL_CH) < 0) { (dev->ioctl_dev, VFL_TYPE_GRABBER, VIDEO_IOCTL_CH) < 0) {
...@@ -1103,16 +1099,15 @@ static __le32 *cx25821_risc_field(__le32 * rp, struct scatterlist *sglist, ...@@ -1103,16 +1099,15 @@ static __le32 *cx25821_risc_field(__le32 * rp, struct scatterlist *sglist,
} }
if (bpl <= sg_dma_len(sg) - offset) { if (bpl <= sg_dma_len(sg) - offset) {
/* fits into current chunk */ /* fits into current chunk */
*(rp++) = *(rp++) = cpu_to_le32(RISC_WRITE | RISC_SOL | RISC_EOL |
cpu_to_le32(RISC_WRITE | RISC_SOL | RISC_EOL | bpl); bpl);
*(rp++) = cpu_to_le32(sg_dma_address(sg) + offset); *(rp++) = cpu_to_le32(sg_dma_address(sg) + offset);
*(rp++) = cpu_to_le32(0); /* bits 63-32 */ *(rp++) = cpu_to_le32(0); /* bits 63-32 */
offset += bpl; offset += bpl;
} else { } else {
/* scanline needs to be split */ /* scanline needs to be split */
todo = bpl; todo = bpl;
*(rp++) = *(rp++) = cpu_to_le32(RISC_WRITE | RISC_SOL |
cpu_to_le32(RISC_WRITE | RISC_SOL |
(sg_dma_len(sg) - offset)); (sg_dma_len(sg) - offset));
*(rp++) = cpu_to_le32(sg_dma_address(sg) + offset); *(rp++) = cpu_to_le32(sg_dma_address(sg) + offset);
*(rp++) = cpu_to_le32(0); /* bits 63-32 */ *(rp++) = cpu_to_le32(0); /* bits 63-32 */
...@@ -1120,8 +1115,8 @@ static __le32 *cx25821_risc_field(__le32 * rp, struct scatterlist *sglist, ...@@ -1120,8 +1115,8 @@ static __le32 *cx25821_risc_field(__le32 * rp, struct scatterlist *sglist,
offset = 0; offset = 0;
sg++; sg++;
while (todo > sg_dma_len(sg)) { while (todo > sg_dma_len(sg)) {
*(rp++) = *(rp++) = cpu_to_le32(RISC_WRITE |
cpu_to_le32(RISC_WRITE | sg_dma_len(sg)); sg_dma_len(sg));
*(rp++) = cpu_to_le32(sg_dma_address(sg)); *(rp++) = cpu_to_le32(sg_dma_address(sg));
*(rp++) = cpu_to_le32(0); /* bits 63-32 */ *(rp++) = cpu_to_le32(0); /* bits 63-32 */
todo -= sg_dma_len(sg); todo -= sg_dma_len(sg);
...@@ -1160,8 +1155,8 @@ int cx25821_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc, ...@@ -1160,8 +1155,8 @@ int cx25821_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc,
can cause next bpl to start close to a page border. First DMA can cause next bpl to start close to a page border. First DMA
region may be smaller than PAGE_SIZE */ region may be smaller than PAGE_SIZE */
/* write and jump need and extra dword */ /* write and jump need and extra dword */
instructions = instructions = fields * (1 + ((bpl + padding) * lines) / PAGE_SIZE +
fields * (1 + ((bpl + padding) * lines) / PAGE_SIZE + lines); lines);
instructions += 2; instructions += 2;
rc = btcx_riscmem_alloc(pci, risc, instructions * 12); rc = btcx_riscmem_alloc(pci, risc, instructions * 12);
...@@ -1215,8 +1210,8 @@ static __le32 *cx25821_risc_field_audio(__le32 * rp, struct scatterlist *sglist, ...@@ -1215,8 +1210,8 @@ static __le32 *cx25821_risc_field_audio(__le32 * rp, struct scatterlist *sglist,
if (bpl <= sg_dma_len(sg) - offset) { if (bpl <= sg_dma_len(sg) - offset) {
/* fits into current chunk */ /* fits into current chunk */
*(rp++) = *(rp++) = cpu_to_le32(RISC_WRITE | sol | RISC_EOL |
cpu_to_le32(RISC_WRITE | sol | RISC_EOL | bpl); bpl);
*(rp++) = cpu_to_le32(sg_dma_address(sg) + offset); *(rp++) = cpu_to_le32(sg_dma_address(sg) + offset);
*(rp++) = cpu_to_le32(0); /* bits 63-32 */ *(rp++) = cpu_to_le32(0); /* bits 63-32 */
offset += bpl; offset += bpl;
...@@ -1339,8 +1334,8 @@ static irqreturn_t cx25821_irq(int irq, void *dev_id) ...@@ -1339,8 +1334,8 @@ static irqreturn_t cx25821_irq(int irq, void *dev_id)
sram_channels->int_stat); sram_channels->int_stat);
if (vid_status) if (vid_status)
handled += handled += cx25821_video_irq(dev, i,
cx25821_video_irq(dev, i, vid_status); vid_status);
cx_write(PCI_INT_STAT, mask[i]); cx_write(PCI_INT_STAT, mask[i]);
} }
...@@ -1427,9 +1422,8 @@ static int __devinit cx25821_initdev(struct pci_dev *pci_dev, ...@@ -1427,9 +1422,8 @@ static int __devinit cx25821_initdev(struct pci_dev *pci_dev,
goto fail_irq; goto fail_irq;
} }
err = err = request_irq(pci_dev->irq, cx25821_irq,
request_irq(pci_dev->irq, cx25821_irq, IRQF_SHARED, IRQF_SHARED, dev->name, dev);
dev->name, dev);
if (err < 0) { if (err < 0) {
pr_err("%s: can't get IRQ %d\n", dev->name, pci_dev->irq); pr_err("%s: can't get IRQ %d\n", dev->name, pci_dev->irq);
......
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