diff options
Diffstat (limited to 'drivers/staging/media')
67 files changed, 148 insertions, 484 deletions
diff --git a/drivers/staging/media/Kconfig b/drivers/staging/media/Kconfig index 1da5c20d65c0..44280b6c021a 100644 --- a/drivers/staging/media/Kconfig +++ b/drivers/staging/media/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 menuconfig STAGING_MEDIA bool "Media staging drivers" default n diff --git a/drivers/staging/media/bcm2048/Kconfig b/drivers/staging/media/bcm2048/Kconfig index a9fc6e186494..c93a0a848c90 100644 --- a/drivers/staging/media/bcm2048/Kconfig +++ b/drivers/staging/media/bcm2048/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # # Multimedia Video device configuration # diff --git a/drivers/staging/media/bcm2048/Makefile b/drivers/staging/media/bcm2048/Makefile index b4f5663d1408..f42056848dc6 100644 --- a/drivers/staging/media/bcm2048/Makefile +++ b/drivers/staging/media/bcm2048/Makefile @@ -1 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_I2C_BCM2048) += radio-bcm2048.o diff --git a/drivers/staging/media/davinci_vpfe/Kconfig b/drivers/staging/media/davinci_vpfe/Kconfig index aea449a8dbf8..eb61141b29e8 100644 --- a/drivers/staging/media/davinci_vpfe/Kconfig +++ b/drivers/staging/media/davinci_vpfe/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 config VIDEO_DM365_VPFE tristate "DM365 VPFE Media Controller Capture Driver" depends on VIDEO_V4L2 diff --git a/drivers/staging/media/davinci_vpfe/Makefile b/drivers/staging/media/davinci_vpfe/Makefile index 9268e507f791..0ae8c5014f74 100644 --- a/drivers/staging/media/davinci_vpfe/Makefile +++ b/drivers/staging/media/davinci_vpfe/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_VIDEO_DM365_VPFE) += davinci-vfpe.o davinci-vfpe-objs := \ diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c index 3d910b85905c..30e2edc0cec5 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c @@ -1264,8 +1264,7 @@ static int ipipe_s_config(struct v4l2_subdev *sd, struct vpfe_ipipe_config *cfg) module_if = &ipipe_modules[i]; from = *(void **)((void *)cfg + module_if->config_offset); - params = kmalloc(sizeof(struct ipipe_module_params), - GFP_KERNEL); + params = kmalloc(sizeof(*params), GFP_KERNEL); to = (void *)params + module_if->param_offset; size = module_if->param_size; @@ -1306,8 +1305,7 @@ static int ipipe_g_config(struct v4l2_subdev *sd, struct vpfe_ipipe_config *cfg) module_if = &ipipe_modules[i]; to = *(void **)((void *)cfg + module_if->config_offset); - params = kmalloc(sizeof(struct ipipe_module_params), - GFP_KERNEL); + params = kmalloc(sizeof(*params), GFP_KERNEL); from = (void *)params + module_if->param_offset; size = module_if->param_size; diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.h b/drivers/staging/media/davinci_vpfe/dm365_ipipe.h index 174334b53f96..866ae12aeb07 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.h +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.h @@ -27,8 +27,6 @@ #include "davinci_vpfe_user.h" #include "vpfe_video.h" -#define CEIL(a, b) (((a) + (b-1)) / (b)) - enum ipipe_noise_filter { IPIPE_D2F_1ST = 0, IPIPE_D2F_2ND = 1, diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c index 565a3dc5bed1..110473c30577 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c @@ -825,8 +825,10 @@ ipipe_set_lum_adj_regs(void __iomem *base_addr, struct ipipe_lum_adj *lum_adj) regw_ip(base_addr, val, YUV_ADJ); } -#define IPIPE_S12Q8(decimal, integer) \ - (((decimal & 0xff) | ((integer & 0xf) << 8))) +inline u32 ipipe_s12q8(unsigned short decimal, short integer) +{ + return (decimal & 0xff) | ((integer & 0xf) << 8); +} void ipipe_set_rgb2ycbcr_regs(void __iomem *base_addr, struct vpfe_ipipe_rgb2yuv *yuv) @@ -835,23 +837,23 @@ void ipipe_set_rgb2ycbcr_regs(void __iomem *base_addr, /* S10Q8 */ ipipe_clock_enable(base_addr); - val = IPIPE_S12Q8(yuv->coef_ry.decimal, yuv->coef_ry.integer); + val = ipipe_s12q8(yuv->coef_ry.decimal, yuv->coef_ry.integer); regw_ip(base_addr, val, YUV_MUL_RY); - val = IPIPE_S12Q8(yuv->coef_gy.decimal, yuv->coef_gy.integer); + val = ipipe_s12q8(yuv->coef_gy.decimal, yuv->coef_gy.integer); regw_ip(base_addr, val, YUV_MUL_GY); - val = IPIPE_S12Q8(yuv->coef_by.decimal, yuv->coef_by.integer); + val = ipipe_s12q8(yuv->coef_by.decimal, yuv->coef_by.integer); regw_ip(base_addr, val, YUV_MUL_BY); - val = IPIPE_S12Q8(yuv->coef_rcb.decimal, yuv->coef_rcb.integer); + val = ipipe_s12q8(yuv->coef_rcb.decimal, yuv->coef_rcb.integer); regw_ip(base_addr, val, YUV_MUL_RCB); - val = IPIPE_S12Q8(yuv->coef_gcb.decimal, yuv->coef_gcb.integer); + val = ipipe_s12q8(yuv->coef_gcb.decimal, yuv->coef_gcb.integer); regw_ip(base_addr, val, YUV_MUL_GCB); - val = IPIPE_S12Q8(yuv->coef_bcb.decimal, yuv->coef_bcb.integer); + val = ipipe_s12q8(yuv->coef_bcb.decimal, yuv->coef_bcb.integer); regw_ip(base_addr, val, YUV_MUL_BCB); - val = IPIPE_S12Q8(yuv->coef_rcr.decimal, yuv->coef_rcr.integer); + val = ipipe_s12q8(yuv->coef_rcr.decimal, yuv->coef_rcr.integer); regw_ip(base_addr, val, YUV_MUL_RCR); - val = IPIPE_S12Q8(yuv->coef_gcr.decimal, yuv->coef_gcr.integer); + val = ipipe_s12q8(yuv->coef_gcr.decimal, yuv->coef_gcr.integer); regw_ip(base_addr, val, YUV_MUL_GCR); - val = IPIPE_S12Q8(yuv->coef_bcr.decimal, yuv->coef_bcr.integer); + val = ipipe_s12q8(yuv->coef_bcr.decimal, yuv->coef_bcr.integer); regw_ip(base_addr, val, YUV_MUL_BCR); regw_ip(base_addr, yuv->out_ofst_y & RGB2YCBCR_OFST_MASK, YUV_OFT_Y); regw_ip(base_addr, yuv->out_ofst_cb & RGB2YCBCR_OFST_MASK, YUV_OFT_CB); diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c index 22fcdbcde96b..51d4cd1bdb97 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c @@ -104,7 +104,7 @@ ipipeif_get_cfg_src1(struct vpfe_ipipeif_device *ipipeif) informat = &ipipeif->formats[IPIPEIF_PAD_SINK]; if (ipipeif->input == IPIPEIF_INPUT_MEMORY && - (informat->code == MEDIA_BUS_FMT_Y8_1X8 || + (informat->code == MEDIA_BUS_FMT_Y8_1X8 || informat->code == MEDIA_BUS_FMT_UV8_1X8)) return IPIPEIF_CCDC; @@ -189,7 +189,7 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd) enum ipipeif_input_source ipipeif_source; u32 isif_port_if; void __iomem *ipipeif_base_addr; - unsigned int val; + unsigned long val; int data_shift; int pack_mode; int source1; @@ -296,14 +296,14 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd) case MEDIA_BUS_FMT_YUYV8_1X16: case MEDIA_BUS_FMT_UYVY8_2X8: case MEDIA_BUS_FMT_Y8_1X8: - RESETBIT(val, IPIPEIF_CFG2_YUV8_SHIFT); - SETBIT(val, IPIPEIF_CFG2_YUV16_SHIFT); + clear_bit(IPIPEIF_CFG2_YUV8_SHIFT, &val); + set_bit(IPIPEIF_CFG2_YUV16_SHIFT, &val); ipipeif_write(val, ipipeif_base_addr, IPIPEIF_CFG2); break; default: - RESETBIT(val, IPIPEIF_CFG2_YUV8_SHIFT); - RESETBIT(val, IPIPEIF_CFG2_YUV16_SHIFT); + clear_bit(IPIPEIF_CFG2_YUV8_SHIFT, &val); + clear_bit(IPIPEIF_CFG2_YUV16_SHIFT, &val); ipipeif_write(val, ipipeif_base_addr, IPIPEIF_CFG2); break; } @@ -344,23 +344,23 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd) switch (isif_port_if) { case MEDIA_BUS_FMT_YUYV8_1X16: case MEDIA_BUS_FMT_YUYV10_1X20: - RESETBIT(val, IPIPEIF_CFG2_YUV8_SHIFT); - SETBIT(val, IPIPEIF_CFG2_YUV16_SHIFT); + clear_bit(IPIPEIF_CFG2_YUV8_SHIFT, &val); + set_bit(IPIPEIF_CFG2_YUV16_SHIFT, &val); break; case MEDIA_BUS_FMT_YUYV8_2X8: case MEDIA_BUS_FMT_UYVY8_2X8: case MEDIA_BUS_FMT_Y8_1X8: case MEDIA_BUS_FMT_YUYV10_2X10: - SETBIT(val, IPIPEIF_CFG2_YUV8_SHIFT); - SETBIT(val, IPIPEIF_CFG2_YUV16_SHIFT); + set_bit(IPIPEIF_CFG2_YUV8_SHIFT, &val); + set_bit(IPIPEIF_CFG2_YUV16_SHIFT, &val); val |= IPIPEIF_CBCR_Y << IPIPEIF_CFG2_YUV8P_SHIFT; break; default: /* Bayer */ ipipeif_write(params.if_5_1.clip, ipipeif_base_addr, - IPIPEIF_OCLIP); + IPIPEIF_OCLIP); } ipipeif_write(val, ipipeif_base_addr, IPIPEIF_CFG2); break; @@ -389,7 +389,7 @@ ipipeif_set_config(struct v4l2_subdev *sd, struct ipipeif_params *config) ipipeif->config.rsz = config->rsz; ipipeif->config.decimation = config->decimation; if (ipipeif->config.decimation && - (ipipeif->config.rsz < IPIPEIF_RSZ_MIN || + (ipipeif->config.rsz < IPIPEIF_RSZ_MIN || ipipeif->config.rsz > IPIPEIF_RSZ_MAX)) { dev_err(dev, "rsz range is %d to %d\n", IPIPEIF_RSZ_MIN, IPIPEIF_RSZ_MAX); @@ -580,7 +580,7 @@ static int ipipeif_enum_mbus_code(struct v4l2_subdev *sd, */ static int ipipeif_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, - struct v4l2_subdev_format *fmt) + struct v4l2_subdev_format *fmt) { struct vpfe_ipipeif_device *ipipeif = v4l2_get_subdevdata(sd); @@ -679,8 +679,8 @@ ipipeif_enum_frame_size(struct v4l2_subdev *sd, */ static struct v4l2_mbus_framefmt * __ipipeif_get_format(struct vpfe_ipipeif_device *ipipeif, - struct v4l2_subdev_pad_config *cfg, unsigned int pad, - enum v4l2_subdev_format_whence which) + struct v4l2_subdev_pad_config *cfg, unsigned int pad, + enum v4l2_subdev_format_whence which) { if (which == V4L2_SUBDEV_FORMAT_TRY) return v4l2_subdev_get_try_format(&ipipeif->subdev, cfg, pad); @@ -697,13 +697,13 @@ __ipipeif_get_format(struct vpfe_ipipeif_device *ipipeif, */ static int ipipeif_set_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, - struct v4l2_subdev_format *fmt) + struct v4l2_subdev_format *fmt) { struct vpfe_ipipeif_device *ipipeif = v4l2_get_subdevdata(sd); struct v4l2_mbus_framefmt *format; format = __ipipeif_get_format(ipipeif, cfg, fmt->pad, fmt->which); - if (format == NULL) + if (!format) return -EINVAL; ipipeif_try_format(ipipeif, cfg, fmt->pad, &fmt->format, fmt->which); @@ -879,7 +879,7 @@ static const struct vpfe_video_operations video_in_ops = { static int ipipeif_link_setup(struct media_entity *entity, const struct media_pad *local, - const struct media_pad *remote, u32 flags) + const struct media_pad *remote, u32 flags) { struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); struct vpfe_ipipeif_device *ipipeif = v4l2_get_subdevdata(sd); @@ -920,8 +920,7 @@ ipipeif_link_setup(struct media_entity *entity, const struct media_pad *local, if (remote->entity == &vpfe->vpfe_ipipe.subdev.entity) /* connencted to ipipe */ ipipeif->output = IPIPEIF_OUTPUT_IPIPE; - else if (remote->entity == &vpfe->vpfe_resizer. - crop_resizer.subdev.entity) + else if (remote->entity == &vpfe->vpfe_resizer.crop_resizer.subdev.entity) /* connected to resizer */ ipipeif->output = IPIPEIF_OUTPUT_RESIZER; else @@ -976,7 +975,7 @@ vpfe_ipipeif_register_entities(struct vpfe_ipipeif_device *ipipeif, flags = 0; ret = media_create_pad_link(&ipipeif->video_in.video_dev.entity, 0, - &ipipeif->subdev.entity, 0, flags); + &ipipeif->subdev.entity, 0, flags); if (ret < 0) goto fail; diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.h b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.h index 4685d64016de..4d126fc871f3 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.h +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.h @@ -166,8 +166,6 @@ struct vpfe_ipipeif_device { #define IPIPEIF_RSZ_MIN 16 #define IPIPEIF_RSZ_MAX 112 #define IPIPEIF_RSZ_CONST 16 -#define SETBIT(reg, bit) (reg = ((reg) | ((0x00000001)<<(bit)))) -#define RESETBIT(reg, bit) (reg = ((reg) & (~(0x00000001<<(bit))))) #define IPIPEIF_ADOFS_LSB_MASK 0x1ff #define IPIPEIF_ADOFS_LSB_SHIFT 5 diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c b/drivers/staging/media/davinci_vpfe/dm365_resizer.c index 9d726298b406..d460963106fa 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c +++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c @@ -386,7 +386,7 @@ resizer_calculate_down_scale_f_div_param(struct device *dev, } o = 10 + (two_power << 2); if (((input_width << 7) / rsz) % 2) - o += (((CEIL(rsz, 1024)) << 1) << n); + o += ((DIV_ROUND_UP(rsz, 1024) << 1) << n); h2 = output_width - h1; /* phi */ val = (h1 * rsz) - (((upper_h1 - (o - 10)) / two_power) << 8); @@ -630,7 +630,7 @@ resizer_calculate_normal_f_div_param(struct device *dev, int input_width, val /= rsz << 1; val <<= 1; val += 2; - o += ((CEIL(rsz, 1024)) << 1); + o += (DIV_ROUND_UP(rsz, 1024) << 1); h1 = val; } h2 = output_width - h1; diff --git a/drivers/staging/media/imx/Kconfig b/drivers/staging/media/imx/Kconfig index 36b276ea2ecc..6c8b69491ef0 100644 --- a/drivers/staging/media/imx/Kconfig +++ b/drivers/staging/media/imx/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 config VIDEO_IMX_MEDIA tristate "i.MX5/6 V4L2 media core driver" depends on ARCH_MXC || COMPILE_TEST diff --git a/drivers/staging/media/imx/imx-ic-common.c b/drivers/staging/media/imx/imx-ic-common.c index 765919487a73..7e2455097315 100644 --- a/drivers/staging/media/imx/imx-ic-common.c +++ b/drivers/staging/media/imx/imx-ic-common.c @@ -1,12 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * V4L2 Image Converter Subdev for Freescale i.MX5/6 SOC * * Copyright (c) 2014-2016 Mentor Graphics Inc. - * - * 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. */ #include <linux/module.h> #include <linux/platform_device.h> diff --git a/drivers/staging/media/imx/imx-ic-prp.c b/drivers/staging/media/imx/imx-ic-prp.c index 3d43cdcb4bb9..10ffe00f1a54 100644 --- a/drivers/staging/media/imx/imx-ic-prp.c +++ b/drivers/staging/media/imx/imx-ic-prp.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * V4L2 Capture IC Preprocess Subdev for Freescale i.MX5/6 SOC * @@ -6,11 +7,6 @@ * for resizing, colorspace conversion, and rotation. * * Copyright (c) 2012-2017 Mentor Graphics Inc. - * - * 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. */ #include <linux/delay.h> #include <linux/interrupt.h> diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c index 5c8e6ad8c025..1ba4a5154fb5 100644 --- a/drivers/staging/media/imx/imx-ic-prpencvf.c +++ b/drivers/staging/media/imx/imx-ic-prpencvf.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * V4L2 Capture IC Preprocess Subdev for Freescale i.MX5/6 SOC * @@ -6,11 +7,6 @@ * for resizing, colorspace conversion, and rotation. * * Copyright (c) 2012-2017 Mentor Graphics Inc. - * - * 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. */ #include <linux/delay.h> #include <linux/interrupt.h> diff --git a/drivers/staging/media/imx/imx-ic.h b/drivers/staging/media/imx/imx-ic.h index 6b2267bda8ab..0dbcf2a7ab5f 100644 --- a/drivers/staging/media/imx/imx-ic.h +++ b/drivers/staging/media/imx/imx-ic.h @@ -1,12 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * V4L2 Image Converter Subdev for Freescale i.MX5/6 SOC * * Copyright (c) 2016 Mentor Graphics Inc. - * - * 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. */ #ifndef _IMX_IC_H #define _IMX_IC_H diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c index 9703c85b19c4..b7ce9d439279 100644 --- a/drivers/staging/media/imx/imx-media-capture.c +++ b/drivers/staging/media/imx/imx-media-capture.c @@ -1,12 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Video Capture Subdev for Freescale i.MX5/6 SOC * * Copyright (c) 2012-2016 Mentor Graphics Inc. - * - * 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. */ #include <linux/delay.h> #include <linux/fs.h> @@ -556,6 +552,7 @@ static void capture_stop_streaming(struct vb2_queue *vq) { struct capture_priv *priv = vb2_get_drv_priv(vq); struct imx_media_buffer *frame; + struct imx_media_buffer *tmp; unsigned long flags; int ret; @@ -570,9 +567,7 @@ static void capture_stop_streaming(struct vb2_queue *vq) /* release all active buffers */ spin_lock_irqsave(&priv->q_lock, flags); - while (!list_empty(&priv->ready_q)) { - frame = list_entry(priv->ready_q.next, - struct imx_media_buffer, list); + list_for_each_entry_safe(frame, tmp, &priv->ready_q, list) { list_del(&frame->list); vb2_buffer_done(&frame->vbuf.vb2_buf, VB2_BUF_STATE_ERROR); } diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 3b7517348666..edc0e9a2a90d 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -1,13 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * V4L2 Capture CSI Subdev for Freescale i.MX5/6 SOC * * Copyright (c) 2014-2017 Mentor Graphics Inc. * Copyright (C) 2017 Pengutronix, Philipp Zabel <kernel@pengutronix.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. */ #include <linux/delay.h> #include <linux/gcd.h> diff --git a/drivers/staging/media/imx/imx-media-dev.c b/drivers/staging/media/imx/imx-media-dev.c index 28a3d23aad5b..bd4ddea488f1 100644 --- a/drivers/staging/media/imx/imx-media-dev.c +++ b/drivers/staging/media/imx/imx-media-dev.c @@ -1,12 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * V4L2 Media Controller Driver for Freescale i.MX5/6 SOC * * Copyright (c) 2016 Mentor Graphics Inc. - * - * 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. */ #include <linux/delay.h> #include <linux/fs.h> diff --git a/drivers/staging/media/imx/imx-media-fim.c b/drivers/staging/media/imx/imx-media-fim.c index 8cf773eef9da..2ab64bc30f5c 100644 --- a/drivers/staging/media/imx/imx-media-fim.c +++ b/drivers/staging/media/imx/imx-media-fim.c @@ -1,12 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Frame Interval Monitor. * * Copyright (c) 2016 Mentor Graphics Inc. - * - * 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. */ #include <linux/delay.h> #include <linux/irq.h> diff --git a/drivers/staging/media/imx/imx-media-internal-sd.c b/drivers/staging/media/imx/imx-media-internal-sd.c index 5e10d95e5529..c547280a309e 100644 --- a/drivers/staging/media/imx/imx-media-internal-sd.c +++ b/drivers/staging/media/imx/imx-media-internal-sd.c @@ -1,14 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Media driver for Freescale i.MX5/6 SOC * * Adds the internal subdevices and the media links between them. * * Copyright (c) 2016 Mentor Graphics Inc. - * - * 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. */ #include <linux/platform_device.h> #include "imx-media.h" diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/staging/media/imx/imx-media-of.c index 03446335ac03..09580d83c685 100644 --- a/drivers/staging/media/imx/imx-media-of.c +++ b/drivers/staging/media/imx/imx-media-of.c @@ -1,14 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Media driver for Freescale i.MX5/6 SOC * * Open Firmware parsing. * * Copyright (c) 2016 Mentor Graphics Inc. - * - * 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. */ #include <linux/of_platform.h> #include <media/v4l2-ctrls.h> diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c index 1c63a2765a81..b41842dba5ec 100644 --- a/drivers/staging/media/imx/imx-media-utils.c +++ b/drivers/staging/media/imx/imx-media-utils.c @@ -1,12 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * V4L2 Media Controller Driver for Freescale i.MX5/6 SOC * * Copyright (c) 2016 Mentor Graphics Inc. - * - * 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. */ #include <linux/module.h> #include "imx-media.h" diff --git a/drivers/staging/media/imx/imx-media-vdic.c b/drivers/staging/media/imx/imx-media-vdic.c index 2808662e2597..3f4b5e9080d4 100644 --- a/drivers/staging/media/imx/imx-media-vdic.c +++ b/drivers/staging/media/imx/imx-media-vdic.c @@ -1,12 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * V4L2 Deinterlacer Subdev for Freescale i.MX5/6 SOC * * Copyright (c) 2017 Mentor Graphics Inc. - * - * 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. */ #include <linux/delay.h> #include <linux/interrupt.h> diff --git a/drivers/staging/media/imx/imx-media.h b/drivers/staging/media/imx/imx-media.h index ae964c8d5be1..1f7501d527fb 100644 --- a/drivers/staging/media/imx/imx-media.h +++ b/drivers/staging/media/imx/imx-media.h @@ -1,12 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * V4L2 Media Controller Driver for Freescale i.MX5/6 SOC * * Copyright (c) 2016 Mentor Graphics Inc. - * - * 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. */ #ifndef _IMX_MEDIA_H #define _IMX_MEDIA_H diff --git a/drivers/staging/media/imx/imx6-mipi-csi2.c b/drivers/staging/media/imx/imx6-mipi-csi2.c index 6a1cee55a49b..f29e28df36ed 100644 --- a/drivers/staging/media/imx/imx6-mipi-csi2.c +++ b/drivers/staging/media/imx/imx6-mipi-csi2.c @@ -1,12 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * MIPI CSI-2 Receiver Subdev for Freescale i.MX6 SOC. * * Copyright (c) 2012-2017 Mentor Graphics Inc. - * - * 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. */ #include <linux/clk.h> #include <linux/interrupt.h> @@ -628,10 +624,8 @@ static int csi2_probe(struct platform_device *pdev) } csi2->base = devm_ioremap(&pdev->dev, res->start, PAGE_SIZE); - if (!csi2->base) { - v4l2_err(&csi2->sd, "failed to map CSI-2 registers\n"); + if (!csi2->base) return -ENOMEM; - } mutex_init(&csi2->lock); diff --git a/drivers/staging/media/ipu3/Kconfig b/drivers/staging/media/ipu3/Kconfig index 75cd889f18f7..f80f3e35f431 100644 --- a/drivers/staging/media/ipu3/Kconfig +++ b/drivers/staging/media/ipu3/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 config VIDEO_IPU3_IMGU tristate "Intel ipu3-imgu driver" depends on PCI && VIDEO_V4L2 diff --git a/drivers/staging/media/ipu3/Makefile b/drivers/staging/media/ipu3/Makefile index fa7fa3372bcb..cc288ae6d5f2 100644 --- a/drivers/staging/media/ipu3/Makefile +++ b/drivers/staging/media/ipu3/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # # Makefile for the IPU3 ImgU drivers # diff --git a/drivers/staging/media/ipu3/ipu3.c b/drivers/staging/media/ipu3/ipu3.c index d575ac78c8f0..e0bbdad7cf5b 100644 --- a/drivers/staging/media/ipu3/ipu3.c +++ b/drivers/staging/media/ipu3/ipu3.c @@ -240,7 +240,6 @@ int imgu_queue_buffers(struct imgu_device *imgu, bool initial, unsigned int pipe for (node = IMGU_NODE_NUM - 1; imgu_queue_getbuf(imgu, IMGU_NODE_IN, pipe); node = node ? node - 1 : IMGU_NODE_NUM - 1) { - if (node == IMGU_NODE_VF && !imgu_pipe->nodes[IMGU_NODE_VF].enabled) { dev_warn(&imgu->pci_dev->dev, diff --git a/drivers/staging/media/mt9t031/Kconfig b/drivers/staging/media/mt9t031/Kconfig index 9a58aaf72edd..232f0cdca68b 100644 --- a/drivers/staging/media/mt9t031/Kconfig +++ b/drivers/staging/media/mt9t031/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 config SOC_CAMERA_MT9T031 tristate "mt9t031 support (DEPRECATED)" depends on SOC_CAMERA && I2C diff --git a/drivers/staging/media/mt9t031/Makefile b/drivers/staging/media/mt9t031/Makefile index bfd24c442b33..f663f73a5474 100644 --- a/drivers/staging/media/mt9t031/Makefile +++ b/drivers/staging/media/mt9t031/Makefile @@ -1 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_SOC_CAMERA_MT9T031) += mt9t031.o diff --git a/drivers/staging/media/rockchip/vpu/Kconfig b/drivers/staging/media/rockchip/vpu/Kconfig index 9a6fc1378242..fc54bbf6753d 100644 --- a/drivers/staging/media/rockchip/vpu/Kconfig +++ b/drivers/staging/media/rockchip/vpu/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 config VIDEO_ROCKCHIP_VPU tristate "Rockchip VPU driver" depends on ARCH_ROCKCHIP || COMPILE_TEST @@ -5,7 +6,6 @@ config VIDEO_ROCKCHIP_VPU select VIDEOBUF2_DMA_CONTIG select VIDEOBUF2_VMALLOC select V4L2_MEM2MEM_DEV - default n help Support for the Video Processing Unit present on Rockchip SoC, which accelerates video and image encoding and decoding. diff --git a/drivers/staging/media/rockchip/vpu/Makefile b/drivers/staging/media/rockchip/vpu/Makefile index e9d733bb7632..ae5d143a0bfa 100644 --- a/drivers/staging/media/rockchip/vpu/Makefile +++ b/drivers/staging/media/rockchip/vpu/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_VIDEO_ROCKCHIP_VPU) += rockchip-vpu.o rockchip-vpu-y += \ diff --git a/drivers/staging/media/soc_camera/Kconfig b/drivers/staging/media/soc_camera/Kconfig index bacd30f0348d..4a54db121574 100644 --- a/drivers/staging/media/soc_camera/Kconfig +++ b/drivers/staging/media/soc_camera/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 config SOC_CAMERA tristate "SoC camera support" depends on VIDEO_V4L2 && HAS_DMA && I2C && BROKEN diff --git a/drivers/staging/media/soc_camera/imx074.c b/drivers/staging/media/soc_camera/imx074.c index 1676c166dc83..d907aa62f898 100644 --- a/drivers/staging/media/soc_camera/imx074.c +++ b/drivers/staging/media/soc_camera/imx074.c @@ -1,15 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Driver for IMX074 CMOS Image Sensor from Sony * * Copyright (C) 2010, Guennadi Liakhovetski <g.liakhovetski@gmx.de> * * Partially inspired by the IMX074 driver from the Android / MSM tree - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ - #include <linux/delay.h> #include <linux/i2c.h> #include <linux/v4l2-mediabus.h> diff --git a/drivers/staging/media/soc_camera/mt9t031.c b/drivers/staging/media/soc_camera/mt9t031.c index 4ff179302b4f..615ae9df2c57 100644 --- a/drivers/staging/media/soc_camera/mt9t031.c +++ b/drivers/staging/media/soc_camera/mt9t031.c @@ -1,13 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Driver for MT9T031 CMOS Image Sensor from Micron * * Copyright (C) 2008, Guennadi Liakhovetski, DENX Software Engineering <lg@denx.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ - #include <linux/device.h> #include <linux/i2c.h> #include <linux/log2.h> diff --git a/drivers/staging/media/soc_camera/soc_camera.c b/drivers/staging/media/soc_camera/soc_camera.c index 1ab86a7499b9..a6232dcd59bc 100644 --- a/drivers/staging/media/soc_camera/soc_camera.c +++ b/drivers/staging/media/soc_camera/soc_camera.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * camera image capture (abstract) bus driver * @@ -10,12 +11,7 @@ * SoCs. Later it should also be used for i.MX31 SoCs from Freescale. * It can handle multiple cameras and / or multiple buses, which can * be used, e.g., in stereo-vision applications. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ - #include <linux/device.h> #include <linux/err.h> #include <linux/i2c.h> diff --git a/drivers/staging/media/soc_camera/soc_mediabus.c b/drivers/staging/media/soc_camera/soc_mediabus.c index be74008ec0ca..2aa646c89c1f 100644 --- a/drivers/staging/media/soc_camera/soc_mediabus.c +++ b/drivers/staging/media/soc_camera/soc_mediabus.c @@ -1,13 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 /* * soc-camera media bus helper routines * * Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ - #include <linux/kernel.h> #include <linux/module.h> diff --git a/drivers/staging/media/soc_camera/soc_mt9v022.c b/drivers/staging/media/soc_camera/soc_mt9v022.c index 6d922b17ea94..e7e0d3d29499 100644 --- a/drivers/staging/media/soc_camera/soc_mt9v022.c +++ b/drivers/staging/media/soc_camera/soc_mt9v022.c @@ -1,13 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Driver for MT9V022 CMOS Image Sensor from Micron * * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ - #include <linux/videodev2.h> #include <linux/slab.h> #include <linux/i2c.h> diff --git a/drivers/staging/media/soc_camera/soc_ov5642.c b/drivers/staging/media/soc_camera/soc_ov5642.c index 0931898c79dd..94696d7baf83 100644 --- a/drivers/staging/media/soc_camera/soc_ov5642.c +++ b/drivers/staging/media/soc_camera/soc_ov5642.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Driver for OV5642 CMOS Image Sensor from Omnivision * @@ -8,12 +9,7 @@ * * Based on Omnivision OV7670 Camera Driver * Copyright (C) 2006-7 Jonathan Corbet <corbet@lwn.net> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ - #include <linux/bitops.h> #include <linux/delay.h> #include <linux/i2c.h> diff --git a/drivers/staging/media/soc_camera/soc_ov9740.c b/drivers/staging/media/soc_camera/soc_ov9740.c index a07d3145d1b4..7c765595d85f 100644 --- a/drivers/staging/media/soc_camera/soc_ov9740.c +++ b/drivers/staging/media/soc_camera/soc_ov9740.c @@ -1,15 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0 /* * OmniVision OV9740 Camera Driver * * Copyright (C) 2011 NVIDIA Corporation * * Based on ov9640 camera driver. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ - #include <linux/init.h> #include <linux/module.h> #include <linux/i2c.h> diff --git a/drivers/staging/media/sunxi/Kconfig b/drivers/staging/media/sunxi/Kconfig index c78d92240ceb..4549a135741f 100644 --- a/drivers/staging/media/sunxi/Kconfig +++ b/drivers/staging/media/sunxi/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 config VIDEO_SUNXI bool "Allwinner sunXi family Video Devices" depends on ARCH_SUNXI || COMPILE_TEST diff --git a/drivers/staging/media/sunxi/Makefile b/drivers/staging/media/sunxi/Makefile index cee2846c3ecf..b87140b0e15f 100644 --- a/drivers/staging/media/sunxi/Makefile +++ b/drivers/staging/media/sunxi/Makefile @@ -1 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_VIDEO_SUNXI_CEDRUS) += cedrus/ diff --git a/drivers/staging/media/sunxi/cedrus/Kconfig b/drivers/staging/media/sunxi/cedrus/Kconfig index 3252efa422f9..17733e9a088f 100644 --- a/drivers/staging/media/sunxi/cedrus/Kconfig +++ b/drivers/staging/media/sunxi/cedrus/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 config VIDEO_SUNXI_CEDRUS tristate "Allwinner Cedrus VPU driver" depends on VIDEO_DEV && VIDEO_V4L2 && MEDIA_CONTROLLER diff --git a/drivers/staging/media/sunxi/cedrus/Makefile b/drivers/staging/media/sunxi/cedrus/Makefile index e9dc68b7bcb6..808842f0119e 100644 --- a/drivers/staging/media/sunxi/cedrus/Makefile +++ b/drivers/staging/media/sunxi/cedrus/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_VIDEO_SUNXI_CEDRUS) += sunxi-cedrus.o sunxi-cedrus-y = cedrus.o cedrus_video.o cedrus_hw.o cedrus_dec.o cedrus_mpeg2.o diff --git a/drivers/staging/media/tegra-vde/Kconfig b/drivers/staging/media/tegra-vde/Kconfig index 5c4914674468..ff8e846cd15d 100644 --- a/drivers/staging/media/tegra-vde/Kconfig +++ b/drivers/staging/media/tegra-vde/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 config TEGRA_VDE tristate "NVIDIA Tegra Video Decoder Engine driver" depends on ARCH_TEGRA || COMPILE_TEST diff --git a/drivers/staging/media/tegra-vde/Makefile b/drivers/staging/media/tegra-vde/Makefile index 444c1d62daa1..7f9020e634f3 100644 --- a/drivers/staging/media/tegra-vde/Makefile +++ b/drivers/staging/media/tegra-vde/Makefile @@ -1 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_TEGRA_VDE) += tegra-vde.o diff --git a/drivers/staging/media/tegra-vde/tegra-vde.c b/drivers/staging/media/tegra-vde/tegra-vde.c index aa6c6bba961e..a5020dbf6eef 100644 --- a/drivers/staging/media/tegra-vde/tegra-vde.c +++ b/drivers/staging/media/tegra-vde/tegra-vde.c @@ -1,12 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * NVIDIA Tegra Video decoder driver * * Copyright (C) 2016-2017 Dmitry Osipenko <digetx@gmail.com> * - * 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. */ #include <linux/clk.h> diff --git a/drivers/staging/media/tegra-vde/uapi.h b/drivers/staging/media/tegra-vde/uapi.h index 4bce08a7a54c..a0dad1ed94ef 100644 --- a/drivers/staging/media/tegra-vde/uapi.h +++ b/drivers/staging/media/tegra-vde/uapi.h @@ -1,12 +1,5 @@ -/* - * Copyright (C) 2016-2017 Dmitry Osipenko <digetx@gmail.com> - * - * 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. - */ - +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (C) 2016-2017 Dmitry Osipenko <digetx@gmail.com> */ #ifndef _UAPI_TEGRA_VDE_H_ #define _UAPI_TEGRA_VDE_H_ 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 |