History log of /linux-master/drivers/staging/most/video/video.c
Revision Date Author Comments
# c35cc254 23-Mar-2023 Khadija Kamran <kamrankhadijadj@gmail.com>

staging: most: fix line ending with '(' in video/

Splitting function header to multiple lines because of 80 characters per
line limit, results in ending the function call line with '('.
This leads to CHECK reported by checkpatch.pl

Move the function parameters right after the '(' in the function call
line.

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Link: https://lore.kernel.org/r/ZBytWDocM7XbXkRx@khadija-virtual-machine
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d6ef48e5 08-Feb-2022 Cai Huoqing <cai.huoqing@linux.dev>

staging: most: video: Make use of the helper macro LIST_HEAD()

Replace "struct list_head head = LIST_HEAD_INIT(head)" with
"LIST_HEAD(head)" to simplify the code.

Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
Link: https://lore.kernel.org/r/20220209032715.38437-1-cai.huoqing@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fa8db398 17-Jul-2021 Len Baker <len.baker@gmx.com>

staging/most: Remove all strcpy() uses in favor of strscpy()

strcpy() performs no bounds checking on the destination buffer. This
could result in linear overflows beyond the end of the buffer, leading
to all kinds of misbehaviors. The safe replacement is strscpy().

Signed-off-by: Len Baker <len.baker@gmx.com>
Link: https://lore.kernel.org/r/20210717160512.16176-1-len.baker@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6367dee9 31-Jan-2021 Kumar Kartikeya Dwivedi <memxor@gmail.com>

staging: most: Switch from strlcpy to strscpy

strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20210131172838.146706-5-memxor@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b2765275 10-Mar-2020 Christian Gromm <christian.gromm@microchip.com>

staging: most: move core files out of the staging area

This patch moves the core module to the /drivers/most directory
and makes all necessary changes in order to not break the build.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1583845362-26707-2-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e653614e 02-Feb-2020 Hans Verkuil <hverkuil-cisco@xs4all.nl>

media: staging/most: rename VFL_TYPE_GRABBER to _VIDEO

'GRABBER' is a weird name, all other types map to the /dev
device names. Rename to 'VIDEO' to be consistent with the
other types.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Christian Gromm <christian.gromm@microchip.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 532c2919 15-Jan-2020 Masahiro Yamada <masahiroy@kernel.org>

staging: most: remove header include path to drivers/staging

There is no need to add "ccflags-y += -I $(srctree)/drivers/staging"
just for including <most/most.h>.

Use the #include "..." directive with the correct relative path.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20200115164451.13203-1-masahiroy@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6f4d22d7 13-Dec-2019 Christian Gromm <christian.gromm@microchip.com>

staging: most: use angle brackets in include path

This patch replaces the double quotes in all include paths
with angle brackets.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1576238662-16512-7-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 45917e79 13-Dec-2019 Christian Gromm <christian.gromm@microchip.com>

staging: most: rename struct core_component

The stuctures defined in the most.h header file will be exposed to the
kernel once the file is moved out of the staging area. That's why the name
is changed into something more descriptive.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1576238662-16512-3-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c1d3fb8a 13-Dec-2019 Christian Gromm <christian.gromm@microchip.com>

staging: most: rename core.h to most.h

This patch renames the core header file core.h to most.h. The intention
behind this is to have a meaningful name once this file is moved to the
/include/linux directory.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1576238662-16512-2-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 08283d30 08-Nov-2019 Christian Gromm <christian.gromm@microchip.com>

staging: most: block module removal while having active configfs items

This patch avoids that core component modules are being unloaded
while the related configfs interface has active items in its directories.
It is needed to prevent the situation where the core module cannot
be unloaded anymore, because the reference count 'used by' indicates that
the module is still being used and the usage count cannot be decreased by
calling rmdir, as the configfs directory has already been removed.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1573230068-27658-3-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a20eefae 26-Jul-2019 Sebastian Andrzej Siewior <bigeasy@linutronix.de>

staging: most: Use DEFINE_SPINLOCK() instead of struct spinlock

For spinlocks the type spinlock_t should be used instead of "struct
spinlock".

Use DEFINE_SPINLOCK() and spare the run time initialization

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190704153803.12739-5-bigeasy@linutronix.de
Link: https://lore.kernel.org/r/alpine.DEB.2.21.1907261319100.1791@nanos.tec.linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 338d9637 26-Jun-2019 Hans Verkuil <hverkuil@xs4all.nl>

staging/most/video: set device_caps in struct video_device

Instead of filling in the struct v4l2_capability device_caps
field, fill in the struct video_device device_caps field.

That way the V4L2 core knows what the capabilities of the
video device are.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c90c1b42 13-Jun-2019 Christian Gromm <christian.gromm@microchip.com>

staging: most: deregister net and video config subsystems with configFS

This patch makes the modules net and video deregister its config subsystems
when the modules are removed from the kernel.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# bb3982b4 12-Jun-2019 Christian Gromm <christian.gromm@microchip.com>

staging: most: register net and video config subsystems with configFS

This patch makes the core components net and video register their config
subsystems with configFS. It is needed to have the configuration interface
of the modules exposed to user space.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# dfee92dd 03-Apr-2019 Christian Gromm <christian.gromm@microchip.com>

staging: most: change signature of function probe_channel

This patch adds the param argument to the function parameter of
the call-back probe_channel. This parameter is needed to configure
the channels of an attached device.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 1f447e51 05-Sep-2018 Colin Ian King <colin.king@canonical.com>

staging: most: video: fix registration of an empty comp core_component

Currently we have structrues comp (which is empty) and comp_info being
used to register and deregister the component. This mismatch in naming
occurred from a previous commit that renamed aim_info to comp. Fix this
to use consistent component naming in line with most/net, most/sound etc.

This fixes the message two issues, one with a null empty name when
loading the module:

[ 1485.269515] most_core: registered new core component (null)

and an Oops when removing the module:

[ 1485.277971] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
[ 1485.278648] PGD 0 P4D 0
[ 1485.279253] Oops: 0002 [#2] SMP PTI
[ 1485.279847] CPU: 1 PID: 32629 Comm: modprobe Tainted: P D WC OE 4.18.0-8-generic #9
[ 1485.280442] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 1485.281040] RIP: 0010:most_deregister_component+0x3c/0x70 [most_core]
.. etc

Fixes: 1b10a0316e2d ("staging: most: video: remove aim designators")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f7887f74 14-May-2018 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: most: video: fix build warnings

Commit 7d7cdb4fa552 ("staging: most: video: remove debugging code") ended up
adding a bunch of build warnings about unused variables. Fix that up by
removing those variables as we don't need them anymore.

Cc: Abdun Nihaal <abdun.nihaal@gmail.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 7d7cdb4fa552 ("staging: most: video: remove debugging code")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 7d7cdb4f 08-May-2018 Abdun Nihaal <abdun.nihaal@gmail.com>

staging: most: video: remove debugging code

This patch removes debugging code in video.c that causes the following
checkpatch warning:

WARNING: Prefer using '\"%s...\", __func__' to using function's name in a string

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a9a08845 11-Feb-2018 Linus Torvalds <torvalds@linux-foundation.org>

vfs: do bulk POLL* -> EPOLL* replacement

This is the mindless scripted replacement of kernel use of POLL*
variables as described by Al, done by this script:

for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
done

with de-mangling cleanups yet to come.

NOTE! On almost all architectures, the EPOLL* constants have the same
values as the POLL* constants do. But they keyword here is "almost".
For various bad reasons they aren't the same, and epoll() doesn't
actually work quite correctly in some cases due to this on Sparc et al.

The next patch from Al will sort out the final differences, and we
should be all done.

Scripted-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 7e0d3542 21-Nov-2017 Christian Gromm <christian.gromm@microchip.com>

staging: most: core: fix formatting

This patch fixes coding style violations.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b7937dc4 21-Nov-2017 Christian Gromm <christian.gromm@microchip.com>

staging: most: fix comment sections

This patch updates and corrects the comment sections of the code.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 1b10a031 21-Nov-2017 Christian Gromm <christian.gromm@microchip.com>

staging: most: video: remove aim designators

This patch takes the 'aim' prefixes and variable names off the module and
uses component instead. It is needed because userspace interfacing modules
are referred to as components.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ed021a0f 21-Nov-2017 Christian Gromm <christian.gromm@microchip.com>

staging: most: rename functions to register a driver with most_core

This patch renames the functions to register and deregister a component
module with the core. It is needed because the modules that interface the
userspace are referred to as components.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a1284441 21-Nov-2017 Christian Gromm <christian.gromm@microchip.com>

staging: most: rename struct most_aim

The designator of a module that proivdes means to interface userspace is
called an AIM. Since this name seems to be unappropiate, this kind of
moduels are going to be referred to as componetns. This is done because
such modules function as components to enhance the core with new features.
This patch renames the struct most_aim to core_component.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 4d5f022f 21-Nov-2017 Christian Gromm <christian.gromm@microchip.com>

staging: most: remove proprietary kobjects

This patch removes the proprietary kobjects used by the driver modules and
replaces them with device structs. The patch is needed to have the driver
being integrated into the kernel's device model.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2c22cdfb 21-Nov-2017 Christian Gromm <christian.gromm@microchip.com>

staging: most: video: rename module

This patch renames the folder of the video module. It is needed
to clean up the directory layout of the driver.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>