summaryrefslogtreecommitdiff
path: root/drivers/staging/media/av7110
AgeCommit message (Collapse)AuthorFilesLines
2024-06-04media: av7110: coding style fixes: avoid_externsStefan Herdler5-51/+51
This patch fixes the following checkpatch warnings: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files Removing unnecessary 'extern' declaration of function prototypes in header files. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: loggingStefan Herdler8-187/+157
This patch fixes the following checkpatch warnings: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'level' may be better as '(level)' to avoid precedence issues WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_bootarm', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_diseqc_send', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_fw_cmd', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_fw_query', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_fw_request', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_osd_cmd', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_send_ci_cmd', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_send_fw_cmd', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'gpioirq', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'load_dram', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'ReleaseBitmap', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'vpeirq', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'WriteText', this function's name, in a string WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ... WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level WARNING:TRACING_LOGGING: Unnecessary ftrace-like logging - prefer using ftrace There where different logging styles in this drivers. Convert everything to the recommend pr_* macros. Log messages should mostly be unchanged by this patch. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: deep_indentationStefan Herdler1-117/+117
This patch fixes most the following checkpatch warnings: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring Invert "if" statement to reduce indention level by 1. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: miscellaneousStefan Herdler2-4/+2
This patch fixes the following checkpatch warnings: WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fe_func' - possible side-effects? The MACRO_ARG_REUSE isn't really fixed but marked as intentional. The comment is visible in the checkpatch warning. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: variable typesStefan Herdler4-10/+10
This patch fixes the following checkpatch warnings: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 's32' over 'int32_t' CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u64' over 'uint64_t' WARNING:UNNECESSARY_INT: Prefer 'long' over 'long int' as the int is unnecessary WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: sizeofStefan Herdler2-3/+3
This patch fixes the following checkpatch warnings: WARNING:SIZEOF_PARENTHESIS: sizeof d should be sizeof(d) WARNING:SIZEOF_PARENTHESIS: sizeof f->fmt.sliced should be sizeof(f->fmt.sliced) WARNING:CONST_STRUCT: struct dvb_frontend_ops should normally be const CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*av7110)...) over kzalloc(sizeof(struct av7110)...) Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: comparsationsStefan Herdler3-10/+10
This patch fixes the following checkpatch warnings: WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written ... Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: assignmentsStefan Herdler5-17/+43
This patch fixes the following checkpatch errors: ERROR:ASSIGN_IN_IF: do not use assignment in if condition CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: bracesStefan Herdler6-33/+36
This patch fixes the following checkpatch warnings and errors: WARNING:BRACES: braces {} are not necessary for any arm of this statement WARNING:BRACES: braces {} are not necessary for single statement blocks CHECK:BRACES: braces {} should be used on all arms of this statement CHECK:BRACES: Unbalanced braces around else statement Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: commentsStefan Herdler7-25/+39
This patch fixes the following checkpatch warnings: WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 WARNING:EMBEDDED_FILENAME: It's generally not useful to have the filename in the file Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: whitespace (strict)Stefan Herdler11-114/+114
This patch fixes the following checkpatch warnings: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis CHECK:SPACING: No space is necessary after a cast CHECK:SPACING: space preferred before that '|' (ctx:VxE) CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) CHECK:SPACING: spaces preferred around that '+' (ctx:VxV) CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) CHECK:SPACING: spaces preferred around that '|' (ctx:VxV) Additional whitespace fixes found by "checkpatch.pl --strict". Whitespace changes only. "git diff -w" shows no changes. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: newlineStefan Herdler7-52/+54
This patch fixes the following checkpatch warnings: ERROR:ELSE_AFTER_BRACE: else should follow close brace '}' ERROR:OPEN_BRACE: open brace '{' following enum go on the same line ERROR:OPEN_BRACE: open brace '{' following struct go on the same line ERROR:OPEN_BRACE: that open brace { should be on the previous line ERROR:TRAILING_STATEMENTS: trailing statements should be on next line CHECK:LOGICAL_CONTINUATIONS: Logical continuations should be on the previous line Newline and whitespace changes only. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: whitespaceStefan Herdler9-104/+104
This patch fixes the following checkpatch warnings: ERROR:SPACING: need consistent spacing around '&' (ctx:WxO) ERROR:SPACING: need consistent spacing around '&' (ctx:WxV) ERROR:SPACING: need consistent spacing around '-' (ctx:WxV) ERROR:SPACING: space prohibited after that '~' (ctx:OxW) ERROR:SPACING: space prohibited after that open parenthesis '(' ERROR:SPACING: space prohibited before that close parenthesis ')' ERROR:SPACING: space prohibited before that ':' (ctx:WxE) ERROR:SPACING: space prohibited before that ',' (ctx:WxW) ERROR:SPACING: space required after that ',' (ctx:VxV) ERROR:SPACING: space required before that '-' (ctx:OxV) ERROR:SPACING: space required before that '~' (ctx:OxV) ERROR:SPACING: space required before the open brace '{' ERROR:SPACING: space required before the open parenthesis '(' ERROR:SPACING: spaces required around that '&&' (ctx:ExV) ERROR:SPACING: spaces required around that '!=' (ctx:VxO) ERROR:SPACING: spaces required around that '&=' (ctx:VxO) ERROR:SPACING: spaces required around that '==' (ctx:VxO) ERROR:SPACING: spaces required around that '!=' (ctx:VxV) ERROR:SPACING: spaces required around that '+=' (ctx:VxV) ERROR:SPACING: spaces required around that '-=' (ctx:VxV) ERROR:SPACING: spaces required around that '<' (ctx:VxV) ERROR:SPACING: spaces required around that '<=' (ctx:VxV) ERROR:SPACING: spaces required around that '=' (ctx:VxV) ERROR:SPACING: spaces required around that '>' (ctx:VxV) ERROR:SPACING: spaces required around that '>=' (ctx:VxV) ERROR:SPACING: spaces required around that '|=' (ctx:VxV) WARNING:LEADING_SPACE: please, no spaces at the start of a line WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline WARNING:SPACING: space prohibited before semicolon WARNING:SPACING: space prohibited between function name and open parenthesis '(' WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 23) WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 32) WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (32, 39) WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (39, 47) WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (47, 55) WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 18) WARNING:TABSTOP: Statements should start on a tabstop CHECK:SPACING: No space is necessary after a cast CHECK:SPACING: space preferred before that '|' (ctx:VxE) CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) CHECK:SPACING: spaces preferred around that '+' (ctx:VxV) CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) CHECK:SPACING: spaces preferred around that '|' (ctx:VxV) Whitespace changes only. "git diff -w" shows no changes. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: blank linesStefan Herdler10-114/+33
This patch fixes the following checkpatch warnings: CHECK:LINE_SPACING: Please don't use multiple blank lines CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations CHECK:BRACES: Blank lines aren't necessary after an open brace '{' CHECK:BRACES: Blank lines aren't necessary before a close brace '}' WARNING:LINE_SPACING: Missing a blank line after declarations Added or removed blank lines only. "git diff --ignore-blank-lines" shows no changes. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: coding style fixes: pointer_locationStefan Herdler5-58/+58
This patch fixes the following checkpatch warnings: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)" Whitespace changes only. "git diff -w" shows no changes. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: sp8870: coding style fixes: loggingStefan Herdler2-21/+27
This patch fixes the following checkpatch warnings: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level WARNING:TRACING_LOGGING: Unnecessary ftrace-like logging - prefer using ftrace ERROR:TRAILING_STATEMENTS: trailing statements should be on next line Convert logging to the recommend pr_* macros. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: sp8870: coding style fixes: miscellaneousStefan Herdler2-13/+14
This patch fixes the following checkpatch: ERROR:ASSIGN_IN_IF: do not use assignment in if condition WARNING:BRACES: braces {} are not necessary for any arm of this statement WARNING:CONST_STRUCT: struct dvb_frontend_ops should normally be const WARNING:EXPORT_SYMBOL: EXPORT_SYMBOL(foo); should immediately follow its function/variable CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*state)...) over kzalloc(sizeof(struct sp8870_state)...) CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written ... CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: sp8870: coding style fixes: newline, comments and bracesStefan Herdler2-29/+34
This patch fixes the following checkpatch warnings: ERROR:OPEN_BRACE: open brace '{' following struct go on the same line ERROR:TRAILING_STATEMENTS: trailing statements should be on next line [*] WARNING:LINE_SPACING: Missing a blank line after declarations WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines CHECK:BRACES: Blank lines aren't necessary after an open brace '{' CHECK:LINE_SPACING: Please don't use multiple blank lines CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations Except the 2 comment-blocks, newline changes only. [* The remaining trailing statement will be fixed in the logging patch.] Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: sp8870: coding style fixes: whitespaceStefan Herdler2-43/+43
This patch fixes the following checkpatch warnings: ERROR:BRACKET_SPACE: space prohibited before open square bracket '[' ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" ERROR:SPACING: space prohibited before that ',' (ctx:WxW) ERROR:SPACING: space required before the open brace '{' WARNING:SPACING: space prohibited between function name and open parenthesis '(' CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis Whitespace changes only. "git diff -w" shows no changes. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: remove budget-patch driverStefan Herdler3-689/+0
This patch removes the budget-patch stand alone driver only. This patch does *not* remove the budget-patch support from the av7110 (= dvb-ttpci) driver. This patch does also *not* remove the support for the full-ts mod. The budget-patch is an obsolete, experimental hardware modification, which aimed to receive the whole transport stream of a transponder by bypassing the av7110. This modification never worked reliably enough to be used in a productive environment. "almost no packet loss" [budget-patch.c #522] is still a packet loss. The successor of the budget-patch is the full-ts mod, which is reliable. The full-ts mod circuit is found on the never rev. 2.2 and 2.3 DVB-S cards ex factory. The full-ts mod support is (only) in the av7110 (= dvb-ttpci) driver. The budget-patch driver is a stand alone driver, which turns the card into a budget card. It doesn't appear to be ever intended for the average user. "Card is required to have loaded firmware to tune properly. Firmware can be loaded by insertion and removal of standard av7110 driver prior to loading this driver." [Kconfig] There is support for the budget-patch in the av7110 (= dvb-ttpci) driver too, which isn't affected by this patch. The budget-patch is obsolete and replaced by the full-ts mod quiet a while now. Remove the budget-patch driver left over from development. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-04media: av7110: remove old documentation filesStefan Herdler50-3303/+0
The documentation has been update and is now at: linux/Documentation/userspace-api/media/dvb/legacy_dvb_osd.rst linux/Documentation/userspace-api/media/dvb/legacy_dvb_audio.rst linux/Documentation/userspace-api/media/dvb/legacy_dvb_video.rst The .rst files of the old documentation aren't necessary any more, remove them. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-09-09media: dvb: symbol fixup for dvb_attach()Greg Kroah-Hartman1-1/+1
In commit 9011e49d54dc ("modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules") the use of symbol_get is properly restricted to GPL-only marked symbols. This interacts oddly with the DVB logic which only uses dvb_attach() to load the dvb driver which then uses symbol_get(). Fix this up by properly marking all of the dvb_attach attach symbols as EXPORT_SYMBOL_GPL(). Fixes: 9011e49d54dc ("modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules") Cc: stable <stable@kernel.org> Reported-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Christoph Hellwig <hch@lst.de> Cc: linux-media@vger.kernel.org Cc: linux-modules@vger.kernel.org Acked-by: Luis Chamberlain <mcgrof@kernel.org> Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Link: https://lore.kernel.org/r/20230908092035.3815268-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-25media: av7110: Remove unnecessary (void*) conversionsAtin Bainada1-2/+2
No need cast (void*) to (struct dvb_demux_feed *) or (struct av7110 *). Signed-off-by: Atin Bainada <hi@atinb.me> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-04-15media: staging: media: av7110: fix VBI output supportHans Verkuil1-38/+60
With these changes it now passes the v4l2-compliance test. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-04-15media: staging: media: av7110: replace BUG_ON by WARN_ONHans Verkuil2-3/+6
No need for BUG_ON, WARN_ON is a lot friendlier. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-04-15media: saa7146: drop 'dev' and 'resources' from struct saa7146_fhHans Verkuil1-19/+16
Instead use vv->resources and video_drvdata(file) to obtain this information. This prepares for the vb2 conversion later when saa7146_fh is dropped completely. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-03-20media: saa7146: drop overlay supportHans Verkuil1-16/+1
Destructive overlay support (i.e. where the video frame is DMA-ed straight into a framebuffer) is effectively dead. It was a necessary evil in the early days when computers were not fast enough to copy SDTV video frames around, but today that's no longer a problem. It requires access to the framebuffer memory, which is a bad idea and very hard to do safely. In addition, in drm it is today almost impossible to get hold of the framebuffer address. So drop support for this. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-03-20media: av7110: prevent underflow in write_ts_to_decoder()Dan Carpenter1-2/+2
The buf[4] value comes from the user via ts_play(). It is a value in the u8 range. The final length we pass to av7110_ipack_instant_repack() is "len - (buf[4] + 1) - 4" so add a check to ensure that the length is not negative. It's not clear that passing a negative len value does anything bad necessarily, but it's not best practice. With the new bounds checking the "if (!len)" condition is no longer possible or required so remove that. Fixes: fd46d16d602a ("V4L/DVB (11759): dvb-ttpci: Add TS replay capability") Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-02-09media: Revert "media: saa7146: deprecate hexium_gemini/orion, mxb and ttpci"Hans Verkuil2-3/+2
This reverts commit e33fdb5a02490059e2f48ced2c038c8a46c6476d. The saa7146-based devices are still in use, esp. for DVB. So move these drivers back to mainline. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-02-09media: Revert "media: av7110: move to staging/media/deprecated/saa7146"Hans Verkuil69-0/+13657
This reverts commit 3e9ad662e34eb2d42ddef5a2883abd34461dfd9a. The av7110 is still in use, so it can't be deprecated. Move it back to staging/media for now. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-08-29media: av7110: move to staging/media/deprecated/saa7146Hans Verkuil69-13657/+0
The av7110 driver depends on saa7146, so move it there. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-08-29media: saa7146: deprecate hexium_gemini/orion, mxb and ttpciHans Verkuil2-2/+3
Deprecate the hexium_gemini, hexium_orion, mxb and ttpci saa7146-based drivers: these drivers do not use the vb2 framework for video streaming, instead it uses the old videobuf framework. We want to get rid of these old drivers, so deprecated these for future removal. [hverkuil: update MAINTAINERS file] Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-08-29media: staging/media/av7110/av7110: Fix typo in stringLi zeming1-1/+1
Remove the repeated ',' from string Signed-off-by: Li zeming <zeming@nfschina.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27media: av7110: Remove duplicate 'with' in two places.Jiang Jian1-1/+1
file: ./drivers/staging/media/av7110/av7110.c line: 2367 * reset with with MASK_31 to MC1 changed to * reset with MASK_31 to MC1 Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-05-13media: av7110: fix prohibited spaces in switch statementHusni Faiz1-12/+12
This patch fixes "space prohibited before that ':'" checkpatch error in the switch statements. Suggested-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Husni Faiz <ahamedhusni73@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-05-13media: av7110: fix switch indentationHusni Faiz1-15/+15
This patch fixes "switch and case should be at the same indent" checkpatch error. Signed-off-by: Husni Faiz <ahamedhusni73@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2021-08-23Revert "media: dvb header files: move some headers to staging"Linus Torvalds4-506/+3
This reverts commit 819fbd3d8ef36c09576c2a0ffea503f5c46e9177. It turns out that some user-space applications use these uapi header files, so even though the only user of the interface is an old driver that was moved to staging, moving the header files causes unnecessary pain. Generally, we really don't want user space to use kernel headers directly (exactly because it causes pain when we re-organize), and instead copy them as needed. But these things happen, and the headers were in the uapi directory, so I guess it's not entirely unreasonable. Link: https://lore.kernel.org/lkml/4e3e0d40-df4a-94f8-7c2d-85010b0873c4@web.de/ Reported-by: Soeren Moch <smoch@web.de> Cc: stable@kernel.org # 5.13 Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-04media: docs: move DVB audio/video docs to stagingMauro Carvalho Chehab49-0/+3300
The only upstream driver using the API described there is the av7110 driver. As the driver was moved to staging, move the API bits to staging as well. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-04media: dvb header files: move some headers to stagingMauro Carvalho Chehab4-3/+506
The audio, video and OSD APIs are used upstream only by the av7110 driver, which was moved to staging. So, move the corresponding header files to it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-02media: sp8870: move it to stagingMauro Carvalho Chehab4-0/+668
This driver is used only by av7110, which is preparing for its retirement. So, move this ancillary driver to stay together with av7110. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-02media: av7110: move driver to stagingMauro Carvalho Chehab18-0/+9688
This driver is really old, from devices that aren't manufactured anymore for more than a decade. Also, the decoder supports only MPEG2, with is not compatible with several modern DVB streams. It is also the only upstream driver relying on the DVB "full-featured" API. Some changes at the frontend drivers seem to have broken it without anybody noticing. Due to that, it sounds it is time to retire the driver for good. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>