Skip to content

Commit

Permalink
[media] cx25821-core.c: Change line endings
Browse files Browse the repository at this point in the history
Change obscure line endings to less obscure ones. (improve readability)

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Leonid V. Fedorenchik authored and Mauro Carvalho Chehab committed Nov 24, 2011
1 parent c14ea5e commit 3f0bfe5
Showing 1 changed file with 21 additions and 27 deletions.
48 changes: 21 additions & 27 deletions drivers/media/video/cx25821/cx25821-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,8 +804,8 @@ void cx25821_set_pixel_format(struct cx25821_dev *dev, int channel_select,
u32 format)
{
if (channel_select <= 7 && channel_select >= 0) {
cx_write(dev->channels[channel_select].
sram_channels->pix_frmt, format);
cx_write(dev->channels[channel_select].sram_channels->pix_frmt,
format);
dev->channels[channel_select].pixel_formats = format;
}
}
Expand Down Expand Up @@ -855,17 +855,15 @@ static void cx25821_initialize(struct cx25821_dev *dev)
}

cx25821_sram_channel_setup_audio(dev,
dev->channels[SRAM_CH08].sram_channels,
128, 0);
dev->channels[SRAM_CH08].sram_channels, 128, 0);

cx25821_gpio_init(dev);
}

static int cx25821_get_resources(struct cx25821_dev *dev)
{
if (request_mem_region
(pci_resource_start(dev->pci, 0), pci_resource_len(dev->pci, 0),
dev->name))
if (request_mem_region(pci_resource_start(dev->pci, 0),
pci_resource_len(dev->pci, 0), dev->name))
return 0;

pr_err("%s: can't get MMIO memory @ 0x%llx\n",
Expand Down Expand Up @@ -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));

if (!dev->lmmio) {
CX25821_ERR
("ioremap failed, maybe increasing __VMALLOC_RESERVE in page.h\n");
CX25821_ERR("ioremap failed, maybe increasing __VMALLOC_RESERVE in page.h\n");
cx25821_iounmap(dev);
return -ENOMEM;
}
Expand Down Expand Up @@ -1004,9 +1001,8 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)
cx25821_video_register(dev);

/* register IOCTL device */
dev->ioctl_dev =
cx25821_vdev_init(dev, dev->pci, &cx25821_videoioctl_template,
"video");
dev->ioctl_dev = cx25821_vdev_init(dev, dev->pci,
&cx25821_videoioctl_template, "video");

if (video_register_device
(dev->ioctl_dev, VFL_TYPE_GRABBER, VIDEO_IOCTL_CH) < 0) {
Expand Down Expand Up @@ -1103,25 +1099,24 @@ static __le32 *cx25821_risc_field(__le32 * rp, struct scatterlist *sglist,
}
if (bpl <= sg_dma_len(sg) - offset) {
/* fits into current chunk */
*(rp++) =
cpu_to_le32(RISC_WRITE | RISC_SOL | RISC_EOL | bpl);
*(rp++) = cpu_to_le32(RISC_WRITE | RISC_SOL | RISC_EOL |
bpl);
*(rp++) = cpu_to_le32(sg_dma_address(sg) + offset);
*(rp++) = cpu_to_le32(0); /* bits 63-32 */
offset += bpl;
} else {
/* scanline needs to be split */
todo = bpl;
*(rp++) =
cpu_to_le32(RISC_WRITE | RISC_SOL |
*(rp++) = cpu_to_le32(RISC_WRITE | RISC_SOL |
(sg_dma_len(sg) - offset));
*(rp++) = cpu_to_le32(sg_dma_address(sg) + offset);
*(rp++) = cpu_to_le32(0); /* bits 63-32 */
todo -= (sg_dma_len(sg) - offset);
offset = 0;
sg++;
while (todo > sg_dma_len(sg)) {
*(rp++) =
cpu_to_le32(RISC_WRITE | sg_dma_len(sg));
*(rp++) = cpu_to_le32(RISC_WRITE |
sg_dma_len(sg));
*(rp++) = cpu_to_le32(sg_dma_address(sg));
*(rp++) = cpu_to_le32(0); /* bits 63-32 */
todo -= sg_dma_len(sg);
Expand Down Expand Up @@ -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
region may be smaller than PAGE_SIZE */
/* write and jump need and extra dword */
instructions =
fields * (1 + ((bpl + padding) * lines) / PAGE_SIZE + lines);
instructions = fields * (1 + ((bpl + padding) * lines) / PAGE_SIZE +
lines);
instructions += 2;
rc = btcx_riscmem_alloc(pci, risc, instructions * 12);

Expand Down Expand Up @@ -1215,8 +1210,8 @@ static __le32 *cx25821_risc_field_audio(__le32 * rp, struct scatterlist *sglist,

if (bpl <= sg_dma_len(sg) - offset) {
/* fits into current chunk */
*(rp++) =
cpu_to_le32(RISC_WRITE | sol | RISC_EOL | bpl);
*(rp++) = cpu_to_le32(RISC_WRITE | sol | RISC_EOL |
bpl);
*(rp++) = cpu_to_le32(sg_dma_address(sg) + offset);
*(rp++) = cpu_to_le32(0); /* bits 63-32 */
offset += bpl;
Expand Down Expand Up @@ -1339,8 +1334,8 @@ static irqreturn_t cx25821_irq(int irq, void *dev_id)
sram_channels->int_stat);

if (vid_status)
handled +=
cx25821_video_irq(dev, i, vid_status);
handled += cx25821_video_irq(dev, i,
vid_status);

cx_write(PCI_INT_STAT, mask[i]);
}
Expand Down Expand Up @@ -1427,9 +1422,8 @@ static int __devinit cx25821_initdev(struct pci_dev *pci_dev,
goto fail_irq;
}

err =
request_irq(pci_dev->irq, cx25821_irq, IRQF_SHARED,
dev->name, dev);
err = request_irq(pci_dev->irq, cx25821_irq,
IRQF_SHARED, dev->name, dev);

if (err < 0) {
pr_err("%s: can't get IRQ %d\n", dev->name, pci_dev->irq);
Expand Down

0 comments on commit 3f0bfe5

Please sign in to comment.