diff options
Diffstat (limited to 'drivers/staging/media/zoran')
-rw-r--r-- | drivers/staging/media/zoran/Kconfig | 1 | ||||
-rw-r--r-- | drivers/staging/media/zoran/videocodec.c | 14 | ||||
-rw-r--r-- | drivers/staging/media/zoran/videocodec.h | 17 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zoran.h | 12 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zoran_card.c | 17 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zoran_card.h | 12 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zoran_device.c | 16 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zoran_device.h | 22 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zoran_driver.c | 114 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zoran_procfs.c | 12 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zoran_procfs.h | 12 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zr36016.c | 18 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zr36016.h | 18 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zr36050.c | 18 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zr36050.h | 18 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zr36057.h | 12 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zr36060.c | 30 | ||||
-rw-r--r-- | drivers/staging/media/zoran/zr36060.h | 18 |
18 files changed, 65 insertions, 316 deletions
diff --git a/drivers/staging/media/zoran/Kconfig b/drivers/staging/media/zoran/Kconfig index 34a18135ede0..84502b0fe48a 100644 --- a/drivers/staging/media/zoran/Kconfig +++ b/drivers/staging/media/zoran/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 config VIDEO_ZORAN tristate "Zoran ZR36057/36067 Video For Linux (Deprecated)" depends on PCI && I2C_ALGOBIT && VIDEO_V4L2 && VIRT_TO_BUS diff --git a/drivers/staging/media/zoran/videocodec.c b/drivers/staging/media/zoran/videocodec.c index 4427ae7126e2..c1ee5cb7e66b 100644 --- a/drivers/staging/media/zoran/videocodec.c +++ b/drivers/staging/media/zoran/videocodec.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * VIDEO MOTION CODECs internal API for video devices * @@ -7,19 +8,6 @@ * (c) 2002 Wolfgang Scherr <scherr@net4you.at> * * $Id: videocodec.c,v 1.1.2.8 2003/03/29 07:16:04 rbultje Exp $ - * - * ------------------------------------------------------------------------ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * * ------------------------------------------------------------------------ */ diff --git a/drivers/staging/media/zoran/videocodec.h b/drivers/staging/media/zoran/videocodec.h index 8ed5a0f7ac01..4946791fce0d 100644 --- a/drivers/staging/media/zoran/videocodec.h +++ b/drivers/staging/media/zoran/videocodec.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * VIDEO MOTION CODECs internal API for video devices * @@ -5,22 +6,6 @@ * bound to a master device. * * (c) 2002 Wolfgang Scherr <scherr@net4you.at> - * - * $Id: videocodec.h,v 1.1.2.4 2003/01/14 21:15:03 rbultje Exp $ - * - * ------------------------------------------------------------------------ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * ------------------------------------------------------------------------ */ /* =================== */ diff --git a/drivers/staging/media/zoran/zoran.h b/drivers/staging/media/zoran/zoran.h index e84fb604a689..1b2e1fb3555f 100644 --- a/drivers/staging/media/zoran/zoran.h +++ b/drivers/staging/media/zoran/zoran.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * zoran - Iomega Buz driver * @@ -12,18 +13,7 @@ * bttv - Bt848 frame grabber driver * Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de) * & Marcus Metzler (mocm@thp.uni-koeln.de) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ - #ifndef _BUZ_H_ #define _BUZ_H_ diff --git a/drivers/staging/media/zoran/zoran_card.c b/drivers/staging/media/zoran/zoran_card.c index ea10523194e8..1d8cd7946bd8 100644 --- a/drivers/staging/media/zoran/zoran_card.c +++ b/drivers/staging/media/zoran/zoran_card.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Zoran zr36057/zr36067 PCI controller driver, for the * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux @@ -11,18 +12,7 @@ * Ronald Bultje <rbultje@ronald.bitfreak.net> * Laurent Pinchart <laurent.pinchart@skynet.be> * Mailinglist <mjpeg-users@lists.sf.net> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ - #include <linux/delay.h> #include <linux/types.h> @@ -1131,8 +1121,6 @@ static struct videocodec_master *zoran_setup_videocodec(struct zoran *zr, m = kmalloc(sizeof(struct videocodec_master), GFP_KERNEL); if (!m) { - dprintk(1, KERN_ERR "%s: %s - no memory\n", - ZR_DEVNAME(zr), __func__); return m; } @@ -1148,8 +1136,7 @@ static struct videocodec_master *zoran_setup_videocodec(struct zoran *zr, strscpy(m->name, ZR_DEVNAME(zr), sizeof(m->name)); m->data = zr; - switch (type) - { + switch (type) { case CODEC_TYPE_ZR36060: m->readreg = zr36060_read; m->writereg = zr36060_write; diff --git a/drivers/staging/media/zoran/zoran_card.h b/drivers/staging/media/zoran/zoran_card.h index 0cdb7d34926d..600b9a3f320c 100644 --- a/drivers/staging/media/zoran/zoran_card.h +++ b/drivers/staging/media/zoran/zoran_card.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Zoran zr36057/zr36067 PCI controller driver, for the * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux @@ -11,18 +12,7 @@ * Ronald Bultje <rbultje@ronald.bitfreak.net> * Laurent Pinchart <laurent.pinchart@skynet.be> * Mailinglist <mjpeg-users@lists.sf.net> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ - #ifndef __ZORAN_CARD_H__ #define __ZORAN_CARD_H__ diff --git a/drivers/staging/media/zoran/zoran_device.c b/drivers/staging/media/zoran/zoran_device.c index 22b27632762d..2191fe69b0f9 100644 --- a/drivers/staging/media/zoran/zoran_device.c +++ b/drivers/staging/media/zoran/zoran_device.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Zoran zr36057/zr36067 PCI controller driver, for the * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux @@ -11,18 +12,7 @@ * Ronald Bultje <rbultje@ronald.bitfreak.net> * Laurent Pinchart <laurent.pinchart@skynet.be> * Mailinglist <mjpeg-users@lists.sf.net> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ - #include <linux/types.h> #include <linux/kernel.h> #include <linux/module.h> @@ -496,7 +486,7 @@ zr36057_overlay (struct zoran *zr, KERN_ERR "%s: zr36057_overlay() - video_stride not aligned\n", ZR_DEVNAME(zr)); - reg = (reg << ZR36057_VSSFGR_DispStride); + reg = reg << ZR36057_VSSFGR_DispStride; reg |= ZR36057_VSSFGR_VidOvf; /* clear overflow status */ btwrite(reg, ZR36057_VSSFGR); @@ -1421,7 +1411,7 @@ zoran_irq (int irq, reg = 0; if (zr->v4l_settings.height > BUZ_MAX_HEIGHT / 2) reg += zr->v4l_settings.bytesperline; - reg = (reg << ZR36057_VSSFGR_DispStride); + reg = reg << ZR36057_VSSFGR_DispStride; reg |= ZR36057_VSSFGR_VidOvf; reg |= ZR36057_VSSFGR_SnapShot; reg |= ZR36057_VSSFGR_FrameGrab; diff --git a/drivers/staging/media/zoran/zoran_device.h b/drivers/staging/media/zoran/zoran_device.h index a507aaad4ebb..b3b8a03f2004 100644 --- a/drivers/staging/media/zoran/zoran_device.h +++ b/drivers/staging/media/zoran/zoran_device.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Zoran zr36057/zr36067 PCI controller driver, for the * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux @@ -11,18 +12,7 @@ * Ronald Bultje <rbultje@ronald.bitfreak.net> * Laurent Pinchart <laurent.pinchart@skynet.be> * Mailinglist <mjpeg-users@lists.sf.net> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ - #ifndef __ZORAN_DEVICE_H__ #define __ZORAN_DEVICE_H__ @@ -34,12 +24,12 @@ extern void GPIO(struct zoran *zr, /* codec (or actually: guest bus) access */ extern int post_office_wait(struct zoran *zr); extern int post_office_write(struct zoran *zr, - unsigned guest, - unsigned reg, - unsigned value); + unsigned int guest, + unsigned int reg, + unsigned int value); extern int post_office_read(struct zoran *zr, - unsigned guest, - unsigned reg); + unsigned int guest, + unsigned int reg); extern void detect_guest_activity(struct zoran *zr); diff --git a/drivers/staging/media/zoran/zoran_driver.c b/drivers/staging/media/zoran/zoran_driver.c index 04f88f9d6bb4..03bbfb723b43 100644 --- a/drivers/staging/media/zoran/zoran_driver.c +++ b/drivers/staging/media/zoran/zoran_driver.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Zoran zr36057/zr36067 PCI controller driver, for the * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux @@ -27,19 +28,7 @@ * bttv - Bt848 frame grabber driver * Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de) * & Marcus Metzler (mocm@thp.uni-koeln.de) - * - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ - #include <linux/init.h> #include <linux/module.h> #include <linux/delay.h> @@ -226,10 +215,6 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh) mem = kmalloc(fh->buffers.buffer_size, GFP_KERNEL | __GFP_NOWARN); if (!mem) { - dprintk(1, - KERN_ERR - "%s: %s - kmalloc for V4L buf %d failed\n", - ZR_DEVNAME(zr), __func__, i); v4l_fbuffer_free(fh); return -ENOBUFS; } @@ -332,7 +317,7 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh) if (fh->buffers.need_contiguous) { mem = kmalloc(fh->buffers.buffer_size, GFP_KERNEL); - if (mem == NULL) { + if (!mem) { dprintk(1, KERN_ERR "%s: %s - kmalloc failed for buffer %d\n", @@ -1739,7 +1724,6 @@ static int zoran_s_fmt_vid_overlay(struct file *file, void *__fh, struct v4l2_format *fmt) { struct zoran_fh *fh = __fh; - int res; dprintk(3, "x=%d, y=%d, w=%d, h=%d, cnt=%d, map=0x%p\n", fmt->fmt.win.w.left, fmt->fmt.win.w.top, @@ -1747,11 +1731,10 @@ static int zoran_s_fmt_vid_overlay(struct file *file, void *__fh, fmt->fmt.win.w.height, fmt->fmt.win.clipcount, fmt->fmt.win.bitmap); - res = setup_window(fh, fmt->fmt.win.w.left, fmt->fmt.win.w.top, + return setup_window(fh, fmt->fmt.win.w.left, fmt->fmt.win.w.top, fmt->fmt.win.w.width, fmt->fmt.win.w.height, (struct v4l2_clip __user *)fmt->fmt.win.clips, fmt->fmt.win.clipcount, fmt->fmt.win.bitmap); - return res; } static int zoran_s_fmt_vid_out(struct file *file, void *__fh, @@ -1773,8 +1756,7 @@ static int zoran_s_fmt_vid_out(struct file *file, void *__fh, if (fh->buffers.allocated) { dprintk(1, KERN_ERR "%s: VIDIOC_S_FMT - cannot change capture mode\n", ZR_DEVNAME(zr)); - res = -EBUSY; - return res; + return -EBUSY; } settings = fh->jpg_settings; @@ -1859,8 +1841,7 @@ static int zoran_s_fmt_vid_cap(struct file *file, void *__fh, fh->buffers.active != ZORAN_FREE) { dprintk(1, KERN_ERR "%s: VIDIOC_S_FMT - cannot change capture mode\n", ZR_DEVNAME(zr)); - res = -EBUSY; - return res; + return -EBUSY; } if (fmt->fmt.pix.height > BUZ_MAX_HEIGHT) fmt->fmt.pix.height = BUZ_MAX_HEIGHT; @@ -1910,7 +1891,7 @@ static int zoran_s_fbuf(struct file *file, void *__fh, { struct zoran_fh *fh = __fh; struct zoran *zr = fh->zr; - int i, res = 0; + int i; __le32 printformat = __cpu_to_le32(fb->fmt.pixelformat); for (i = 0; i < NUM_FORMATS; i++) @@ -1923,20 +1904,15 @@ static int zoran_s_fbuf(struct file *file, void *__fh, return -EINVAL; } - res = setup_fbuffer(fh, fb->base, &zoran_formats[i], fb->fmt.width, + return setup_fbuffer(fh, fb->base, &zoran_formats[i], fb->fmt.width, fb->fmt.height, fb->fmt.bytesperline); - - return res; } static int zoran_overlay(struct file *file, void *__fh, unsigned int on) { struct zoran_fh *fh = __fh; - int res; - - res = setup_overlay(fh, on); - return res; + return setup_overlay(fh, on); } static int zoran_streamoff(struct file *file, void *__fh, enum v4l2_buf_type type); @@ -1963,8 +1939,7 @@ static int zoran_reqbufs(struct file *file, void *__fh, struct v4l2_requestbuffe KERN_ERR "%s: VIDIOC_REQBUFS - buffers already allocated\n", ZR_DEVNAME(zr)); - res = -EBUSY; - return res; + return -EBUSY; } if (fh->map_mode == ZORAN_MAP_MODE_RAW && @@ -1980,8 +1955,7 @@ static int zoran_reqbufs(struct file *file, void *__fh, struct v4l2_requestbuffe fh->buffers.num_buffers = req->count; if (v4l_fbuffer_alloc(fh)) { - res = -ENOMEM; - return res; + return -ENOMEM; } } else if (fh->map_mode == ZORAN_MAP_MODE_JPG_REC || fh->map_mode == ZORAN_MAP_MODE_JPG_PLAY) { @@ -1997,16 +1971,14 @@ static int zoran_reqbufs(struct file *file, void *__fh, struct v4l2_requestbuffe fh->buffers.buffer_size = zoran_v4l2_calc_bufsize(&fh->jpg_settings); if (jpg_fbuffer_alloc(fh)) { - res = -ENOMEM; - return res; + return -ENOMEM; } } else { dprintk(1, KERN_ERR "%s: VIDIOC_REQBUFS - unknown type %d\n", ZR_DEVNAME(zr), req->type); - res = -EINVAL; - return res; + return -EINVAL; } return res; } @@ -2014,11 +1986,8 @@ static int zoran_reqbufs(struct file *file, void *__fh, struct v4l2_requestbuffe static int zoran_querybuf(struct file *file, void *__fh, struct v4l2_buffer *buf) { struct zoran_fh *fh = __fh; - int res; - res = zoran_v4l2_buffer_status(fh, buf, buf->index); - - return res; + return zoran_v4l2_buffer_status(fh, buf, buf->index); } static int zoran_qbuf(struct file *file, void *__fh, struct v4l2_buffer *buf) @@ -2033,8 +2002,7 @@ static int zoran_qbuf(struct file *file, void *__fh, struct v4l2_buffer *buf) dprintk(1, KERN_ERR "%s: VIDIOC_QBUF - invalid buf->type=%d for map_mode=%d\n", ZR_DEVNAME(zr), buf->type, fh->map_mode); - res = -EINVAL; - return res; + return -EINVAL; } res = zoran_v4l_queue_frame(fh, buf->index); @@ -2058,8 +2026,7 @@ static int zoran_qbuf(struct file *file, void *__fh, struct v4l2_buffer *buf) dprintk(1, KERN_ERR "%s: VIDIOC_QBUF - invalid buf->type=%d for map_mode=%d\n", ZR_DEVNAME(zr), buf->type, fh->map_mode); - res = -EINVAL; - return res; + return -EINVAL; } res = zoran_jpg_queue_frame(fh, buf->index, codec_mode); @@ -2093,15 +2060,13 @@ static int zoran_dqbuf(struct file *file, void *__fh, struct v4l2_buffer *buf) dprintk(1, KERN_ERR "%s: VIDIOC_QBUF - invalid buf->type=%d for map_mode=%d\n", ZR_DEVNAME(zr), buf->type, fh->map_mode); - res = -EINVAL; - return res; + return -EINVAL; } num = zr->v4l_pend[zr->v4l_sync_tail & V4L_MASK_FRAME]; if (file->f_flags & O_NONBLOCK && zr->v4l_buffers.buffer[num].state != BUZ_STATE_DONE) { - res = -EAGAIN; - return res; + return -EAGAIN; } res = v4l_sync(fh, num); if (res) @@ -2124,16 +2089,14 @@ static int zoran_dqbuf(struct file *file, void *__fh, struct v4l2_buffer *buf) dprintk(1, KERN_ERR "%s: VIDIOC_QBUF - invalid buf->type=%d for map_mode=%d\n", ZR_DEVNAME(zr), buf->type, fh->map_mode); - res = -EINVAL; - return res; + return -EINVAL; } num = zr->jpg_pend[zr->jpg_que_tail & BUZ_MASK_FRAME]; if (file->f_flags & O_NONBLOCK && zr->jpg_buffers.buffer[num].state != BUZ_STATE_DONE) { - res = -EAGAIN; - return res; + return -EAGAIN; } bs.frame = 0; /* suppress compiler warning */ res = jpg_sync(fh, &bs); @@ -2163,8 +2126,7 @@ static int zoran_streamon(struct file *file, void *__fh, enum v4l2_buf_type type case ZORAN_MAP_MODE_RAW: /* raw capture */ if (zr->v4l_buffers.active != ZORAN_ACTIVE || fh->buffers.active != ZORAN_ACTIVE) { - res = -EBUSY; - return res; + return -EBUSY; } zr->v4l_buffers.active = fh->buffers.active = ZORAN_LOCKED; @@ -2182,8 +2144,7 @@ static int zoran_streamon(struct file *file, void *__fh, enum v4l2_buf_type type /* what is the codec mode right now? */ if (zr->jpg_buffers.active != ZORAN_ACTIVE || fh->buffers.active != ZORAN_ACTIVE) { - res = -EBUSY; - return res; + return -EBUSY; } zr->jpg_buffers.active = fh->buffers.active = ZORAN_LOCKED; @@ -2216,8 +2177,7 @@ static int zoran_streamoff(struct file *file, void *__fh, enum v4l2_buf_type typ case ZORAN_MAP_MODE_RAW: /* raw capture */ if (fh->buffers.active == ZORAN_FREE && zr->v4l_buffers.active != ZORAN_FREE) { - res = -EPERM; /* stay off other's settings! */ - return res; + return -EPERM; /* stay off other's settings! */ } if (zr->v4l_buffers.active == ZORAN_FREE) return res; @@ -2247,8 +2207,7 @@ static int zoran_streamoff(struct file *file, void *__fh, enum v4l2_buf_type typ case ZORAN_MAP_MODE_JPG_PLAY: if (fh->buffers.active == ZORAN_FREE && zr->jpg_buffers.active != ZORAN_FREE) { - res = -EPERM; /* stay off other's settings! */ - return res; + return -EPERM; /* stay off other's settings! */ } if (zr->jpg_buffers.active == ZORAN_FREE) return res; @@ -2288,8 +2247,7 @@ static int zoran_s_std(struct file *file, void *__fh, v4l2_std_id std) if (res) return res; - res = wait_grab_pending(zr); - return res; + return wait_grab_pending(zr); } static int zoran_enum_input(struct file *file, void *__fh, @@ -2332,8 +2290,7 @@ static int zoran_s_input(struct file *file, void *__fh, unsigned int input) return res; /* Make sure the changes come into effect */ - res = wait_grab_pending(zr); - return res; + return wait_grab_pending(zr); } static int zoran_enum_output(struct file *file, void *__fh, @@ -2488,8 +2445,7 @@ static int zoran_s_jpegcomp(struct file *file, void *__fh, dprintk(1, KERN_WARNING "%s: VIDIOC_S_JPEGCOMP called while in playback/capture mode\n", ZR_DEVNAME(zr)); - res = -EBUSY; - return res; + return -EBUSY; } res = zoran_check_jpg_settings(zr, &settings, 0); @@ -2683,8 +2639,7 @@ zoran_mmap (struct file *file, KERN_ERR "%s: %s(%s) - buffers not yet allocated\n", ZR_DEVNAME(zr), __func__, mode_name(fh->map_mode)); - res = -ENOMEM; - return res; + return -ENOMEM; } first = offset / fh->buffers.buffer_size; @@ -2699,8 +2654,7 @@ zoran_mmap (struct file *file, ZR_DEVNAME(zr), __func__, mode_name(fh->map_mode), offset, size, fh->buffers.buffer_size, fh->buffers.num_buffers); - res = -EINVAL; - return res; + return -EINVAL; } /* Check if any buffers are already mapped */ @@ -2710,16 +2664,14 @@ zoran_mmap (struct file *file, KERN_ERR "%s: %s(%s) - buffer %d already mapped\n", ZR_DEVNAME(zr), __func__, mode_name(fh->map_mode), i); - res = -EBUSY; - return res; + return -EBUSY; } } /* map these buffers */ map = kmalloc(sizeof(struct zoran_mapping), GFP_KERNEL); if (!map) { - res = -ENOMEM; - return res; + return -ENOMEM; } map->fh = fh; atomic_set(&map->count, 1); @@ -2740,8 +2692,7 @@ zoran_mmap (struct file *file, KERN_ERR "%s: %s(V4L) - remap_pfn_range failed\n", ZR_DEVNAME(zr), __func__); - res = -EAGAIN; - return res; + return -EAGAIN; } size -= todo; start += todo; @@ -2772,8 +2723,7 @@ zoran_mmap (struct file *file, KERN_ERR "%s: %s(V4L) - remap_pfn_range failed\n", ZR_DEVNAME(zr), __func__); - res = -EAGAIN; - return res; + return -EAGAIN; } size -= todo; start += todo; diff --git a/drivers/staging/media/zoran/zoran_procfs.c b/drivers/staging/media/zoran/zoran_procfs.c index 78ac8f853748..941f73fe323b 100644 --- a/drivers/staging/media/zoran/zoran_procfs.c +++ b/drivers/staging/media/zoran/zoran_procfs.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Zoran zr36057/zr36067 PCI controller driver, for the * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux @@ -11,18 +12,7 @@ * Ronald Bultje <rbultje@ronald.bitfreak.net> * Laurent Pinchart <laurent.pinchart@skynet.be> * Mailinglist <mjpeg-users@lists.sf.net> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ - #include <linux/types.h> #include <linux/kernel.h> #include <linux/module.h> diff --git a/drivers/staging/media/zoran/zoran_procfs.h b/drivers/staging/media/zoran/zoran_procfs.h index 0ac7cb0011f2..db9f642c851a 100644 --- a/drivers/staging/media/zoran/zoran_procfs.h +++ b/drivers/staging/media/zoran/zoran_procfs.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Zoran zr36057/zr36067 PCI controller driver, for the * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux @@ -11,18 +12,7 @@ * Ronald Bultje <rbultje@ronald.bitfreak.net> * Laurent Pinchart <laurent.pinchart@skynet.be> * Mailinglist <mjpeg-users@lists.sf.net> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ - #ifndef __ZORAN_PROCFS_H__ #define __ZORAN_PROCFS_H__ diff --git a/drivers/staging/media/zoran/zr36016.c b/drivers/staging/media/zoran/zr36016.c index 8736b9d8d97e..b300a0abe95f 100644 --- a/drivers/staging/media/zoran/zr36016.c +++ b/drivers/staging/media/zoran/zr36016.c @@ -1,25 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Zoran ZR36016 basic configuration functions * * Copyright (C) 2001 Wolfgang Scherr <scherr@net4you.at> - * - * $Id: zr36016.c,v 1.1.2.14 2003/08/20 19:46:55 rbultje Exp $ - * - * ------------------------------------------------------------------------ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * ------------------------------------------------------------------------ */ - #define ZR016_VERSION "v0.7" #include <linux/module.h> diff --git a/drivers/staging/media/zoran/zr36016.h b/drivers/staging/media/zoran/zr36016.h index 784bcf5727b8..6e66581c27b2 100644 --- a/drivers/staging/media/zoran/zr36016.h +++ b/drivers/staging/media/zoran/zr36016.h @@ -1,25 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Zoran ZR36016 basic configuration functions - header file * * Copyright (C) 2001 Wolfgang Scherr <scherr@net4you.at> - * - * $Id: zr36016.h,v 1.1.2.3 2003/01/14 21:18:07 rbultje Exp $ - * - * ------------------------------------------------------------------------ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * ------------------------------------------------------------------------ */ - #ifndef ZR36016_H #define ZR36016_H diff --git a/drivers/staging/media/zoran/zr36050.c b/drivers/staging/media/zoran/zr36050.c index 5ebfc16672f3..cd58307af378 100644 --- a/drivers/staging/media/zoran/zr36050.c +++ b/drivers/staging/media/zoran/zr36050.c @@ -1,25 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Zoran ZR36050 basic configuration functions * * Copyright (C) 2001 Wolfgang Scherr <scherr@net4you.at> - * - * $Id: zr36050.c,v 1.1.2.11 2003/08/03 14:54:53 rbultje Exp $ - * - * ------------------------------------------------------------------------ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * ------------------------------------------------------------------------ */ - #define ZR050_VERSION "v0.7.1" #include <linux/module.h> diff --git a/drivers/staging/media/zoran/zr36050.h b/drivers/staging/media/zoran/zr36050.h index 9236486d3c2b..c485913dc820 100644 --- a/drivers/staging/media/zoran/zr36050.h +++ b/drivers/staging/media/zoran/zr36050.h @@ -1,25 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Zoran ZR36050 basic configuration functions - header file * * Copyright (C) 2001 Wolfgang Scherr <scherr@net4you.at> - * - * $Id: zr36050.h,v 1.1.2.2 2003/01/14 21:18:22 rbultje Exp $ - * - * ------------------------------------------------------------------------ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * ------------------------------------------------------------------------ */ - #ifndef ZR36050_H #define ZR36050_H diff --git a/drivers/staging/media/zoran/zr36057.h b/drivers/staging/media/zoran/zr36057.h index c8acb21dcb5c..c5138cef4ef5 100644 --- a/drivers/staging/media/zoran/zr36057.h +++ b/drivers/staging/media/zoran/zr36057.h @@ -1,19 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * zr36057.h - zr36057 register offsets * * Copyright (C) 1998 Dave Perks <dperks@ibm.net> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ - #ifndef _ZR36057_H_ #define _ZR36057_H_ diff --git a/drivers/staging/media/zoran/zr36060.c b/drivers/staging/media/zoran/zr36060.c index 2c2e8130fc96..a3c817fd5c07 100644 --- a/drivers/staging/media/zoran/zr36060.c +++ b/drivers/staging/media/zoran/zr36060.c @@ -1,25 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Zoran ZR36060 basic configuration functions * * Copyright (C) 2002 Laurent Pinchart <laurent.pinchart@skynet.be> - * - * $Id: zr36060.c,v 1.1.2.22 2003/05/06 09:35:36 rbultje Exp $ - * - * ------------------------------------------------------------------------ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * ------------------------------------------------------------------------ */ - #define ZR060_VERSION "v0.7" #include <linux/module.h> @@ -40,7 +24,8 @@ #include "videocodec.h" /* it doesn't make sense to have more than 20 or so, - just to prevent some unwanted loops */ + * just to prevent some unwanted loops + */ #define MAX_CODECS 20 /* amount of chips attached via this driver */ @@ -725,7 +710,8 @@ zr36060_set_video (struct videocodec *codec, * ratio 1:2. Setting low_bitrate (insmod option) sets * it to 1:4 (instead of 1:2, zr36060 max) as limit because the * buz can't handle more at decimation=1... Use low_bitrate if - * you have a Buz, unless you know what you're doing */ + * you have a Buz, unless you know what you're doing + */ size = size * cap->quality / (low_bitrate ? 400 : 200); /* Lower limit (arbitrary, 1 KB) */ if (size < 8192) @@ -738,7 +724,8 @@ zr36060_set_video (struct videocodec *codec, /* the MBCVR is the *maximum* block volume, according to the * JPEG ISO specs, this shouldn't be used, since that allows - * for the best encoding quality. So set it to it's max value */ + * for the best encoding quality. So set it to it's max value + */ reg = ptr->max_block_vol; zr36060_write(ptr, ZR060_MBCVR, reg); @@ -933,7 +920,8 @@ zr36060_setup (struct videocodec *codec) memcpy(ptr->v_samp_ratio, zr36060_decimation_v, 8); ptr->bitrate_ctrl = 0; /* 0 or 1 - fixed file size flag - * (what is the difference?) */ + * (what is the difference?) + */ ptr->mode = CODEC_DO_COMPRESSION; ptr->width = 384; ptr->height = 288; diff --git a/drivers/staging/media/zoran/zr36060.h b/drivers/staging/media/zoran/zr36060.h index 82911757ba78..9fa553dc475f 100644 --- a/drivers/staging/media/zoran/zr36060.h +++ b/drivers/staging/media/zoran/zr36060.h @@ -1,25 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Zoran ZR36060 basic configuration functions - header file * * Copyright (C) 2002 Laurent Pinchart <laurent.pinchart@skynet.be> - * - * $Id: zr36060.h,v 1.1.1.1.2.3 2003/01/14 21:18:47 rbultje Exp $ - * - * ------------------------------------------------------------------------ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * ------------------------------------------------------------------------ */ - #ifndef ZR36060_H #define ZR36060_H |