#
c1b21785 |
| 11-Jun-2022 |
Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
media: em28xx: Remove useless license text when SPDX-License-Identifier is already used
An SPDX-License-Identifier is already in place. There is no need to duplicate part of the corresponding licens
media: em28xx: Remove useless license text when SPDX-License-Identifier is already used
An SPDX-License-Identifier is already in place. There is no need to duplicate part of the corresponding license.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
6fa54bc7 |
| 07-Jul-2021 |
Dongliang Mu <mudongliangabcd@gmail.com> |
media: em28xx-input: fix refcount bug in em28xx_usb_disconnect
If em28xx_ir_init fails, it would decrease the refcount of dev. However, in the em28xx_ir_fini, when ir is NULL, it goes to ref_put and
media: em28xx-input: fix refcount bug in em28xx_usb_disconnect
If em28xx_ir_init fails, it would decrease the refcount of dev. However, in the em28xx_ir_fini, when ir is NULL, it goes to ref_put and decrease the refcount of dev. This will lead to a refcount bug.
Fix this bug by removing the kref_put in the error handling code of em28xx_ir_init.
refcount_t: underflow; use-after-free. WARNING: CPU: 0 PID: 7 at lib/refcount.c:28 refcount_warn_saturate+0x18e/0x1a0 lib/refcount.c:28 Modules linked in: CPU: 0 PID: 7 Comm: kworker/0:1 Not tainted 5.13.0 #3 Workqueue: usb_hub_wq hub_event RIP: 0010:refcount_warn_saturate+0x18e/0x1a0 lib/refcount.c:28 Call Trace: kref_put.constprop.0+0x60/0x85 include/linux/kref.h:69 em28xx_usb_disconnect.cold+0xd7/0xdc drivers/media/usb/em28xx/em28xx-cards.c:4150 usb_unbind_interface+0xbf/0x3a0 drivers/usb/core/driver.c:458 __device_release_driver drivers/base/dd.c:1201 [inline] device_release_driver_internal+0x22a/0x230 drivers/base/dd.c:1232 bus_remove_device+0x108/0x160 drivers/base/bus.c:529 device_del+0x1fe/0x510 drivers/base/core.c:3540 usb_disable_device+0xd1/0x1d0 drivers/usb/core/message.c:1419 usb_disconnect+0x109/0x330 drivers/usb/core/hub.c:2221 hub_port_connect drivers/usb/core/hub.c:5151 [inline] hub_port_connect_change drivers/usb/core/hub.c:5440 [inline] port_event drivers/usb/core/hub.c:5586 [inline] hub_event+0xf81/0x1d40 drivers/usb/core/hub.c:5668 process_one_work+0x2c9/0x610 kernel/workqueue.c:2276 process_scheduled_works kernel/workqueue.c:2338 [inline] worker_thread+0x333/0x5b0 kernel/workqueue.c:2424 kthread+0x188/0x1d0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Reported-by: Dongliang Mu <mudongliangabcd@gmail.com> Fixes: ac5688637144 ("media: em28xx: Fix possible memory leak of em28xx struct") Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
#
ac568863 |
| 04-May-2021 |
Igor Matheus Andrade Torrente <igormtorrente@gmail.com> |
media: em28xx: Fix possible memory leak of em28xx struct
The em28xx struct kref isn't being decreased after an error in the em28xx_ir_init, leading to a possible memory leak.
A kref_put and em28xx_
media: em28xx: Fix possible memory leak of em28xx struct
The em28xx struct kref isn't being decreased after an error in the em28xx_ir_init, leading to a possible memory leak.
A kref_put and em28xx_shutdown_buttons is added to the error handler code.
Signed-off-by: Igor Matheus Andrade Torrente <igormtorrente@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
#
0547858b |
| 23-May-2019 |
Sean Young <sean@mess.org> |
media: em28xx: use usb_to_input_id() rather than handrolling it
This also populates the version member correctly.
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mch
media: em28xx: use usb_to_input_id() rather than handrolling it
This also populates the version member correctly.
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
show more ...
|
#
6bd914bc |
| 23-May-2019 |
Sean Young <sean@mess.org> |
media: em28xx: use common code for decoding nec scancodes
Tested on WinTV-HVR-930C.
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
#
5c1c6953 |
| 23-May-2019 |
Sean Young <sean@mess.org> |
media: em28xx: give RC device proper name
Give the RC device the name of the board rather than "1-2:1.0 IR".
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+
media: em28xx: give RC device proper name
Give the RC device the name of the board rather than "1-2:1.0 IR".
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
show more ...
|
#
6fe59b7e |
| 08-Mar-2019 |
Colin Ian King <colin.king@canonical.com> |
media: em28xx-input: make const array addr_list static
Don't populate the array addr_list on the stack but instead make it static. Makes the object code smaller by 20 bytes
Before: text data
media: em28xx-input: make const array addr_list static
Don't populate the array addr_list on the stack but instead make it static. Makes the object code smaller by 20 bytes
Before: text data bss dec hex filename^M 16929 3626 384 20939 51cb ../usb/em28xx/em28xx-input.o
After: text data bss dec hex filename^M 16829 3706 384 20919 51b7 ../usb/em28xx/em28xx-input.o
(gcc version 8.3.0, aarch64)
Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
show more ...
|
#
32590819 |
| 25-Apr-2018 |
Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
MAINTAINERS & files: Canonize the e-mails I use at files
From now on, I'll start using my @kernel.org as my development e-mail.
As such, let's remove the entries that point to the old mchehab@s-ope
MAINTAINERS & files: Canonize the e-mails I use at files
From now on, I'll start using my @kernel.org as my development e-mail.
As such, let's remove the entries that point to the old mchehab@s-opensource.com at MAINTAINERS file.
For the files written with a copyright with mchehab@s-opensource, let's keep Samsung on their names, using mchehab+samsung@kernel.org, in order to keep pointing to my employer, with sponsors the work.
For the files written before I join Samsung (on July, 4 2013), let's just use mchehab@kernel.org.
For bug reports, we can simply point to just kernel.org, as this will reach my mchehab+samsung inbox anyway.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Brian Warner <brian.warner@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
show more ...
|
#
728d9fd9 |
| 23-Mar-2018 |
Mauro Carvalho Chehab <mchehab@s-opensource.com> |
media: em28xx-input: improve error handling code
The current I2C error handling logic makes static analyzers confused:
drivers/media/usb/em28xx/em28xx-input.c:96 em28xx_get_key_terratec() error: u
media: em28xx-input: improve error handling code
The current I2C error handling logic makes static analyzers confused:
drivers/media/usb/em28xx/em28xx-input.c:96 em28xx_get_key_terratec() error: uninitialized symbol 'b'.
Change it to match the coding style we're using elsewhere.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
08cc05e4 |
| 03-Mar-2018 |
Mauro Carvalho Chehab <mchehab@s-opensource.com> |
media: em28xx-input: fix most coding style issues
There are a number of coding style issues at em28xx-input. Fix most of them, by using checkpatch in strict mode to point for it.
Automatic fixes we
media: em28xx-input: fix most coding style issues
There are a number of coding style issues at em28xx-input. Fix most of them, by using checkpatch in strict mode to point for it.
Automatic fixes were made with --fix-inplace, but those were complemented by manual work.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
f22e9e71 |
| 03-Mar-2018 |
Mauro Carvalho Chehab <mchehab@s-opensource.com> |
media: em28xx: Add SPDX license tags where needed
Most of the files there are missing a SPDX license tag. Add.
While here fix some DRIVER_LICENSE macro in order to reflect the source file license,
media: em28xx: Add SPDX license tags where needed
Most of the files there are missing a SPDX license tag. Add.
While here fix some DRIVER_LICENSE macro in order to reflect the source file license, as some of the headers are GPL v2 only.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
0108ae7f |
| 01-Mar-2018 |
Mauro Carvalho Chehab <mchehab@s-opensource.com> |
media: em28xx: constify most static structs
There are several em28xx static structs that can now be constified.
That caused a significant reduction at data segment:
Before: text data bss
media: em28xx: constify most static structs
There are several em28xx static structs that can now be constified.
That caused a significant reduction at data segment:
Before: text data bss dec hex filename 85017 59588 576 145181 2371d drivers/media/usb/em28xx/em28xx.o
After: text data bss dec hex filename 112345 32292 576 145213 2373d drivers/media/usb/em28xx/em28xx.o
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
6d741bfe |
| 07-Aug-2017 |
Sean Young <sean@mess.org> |
media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_*
RC_TYPE is confusing and it's just the protocol. So rename it.
Suggested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-of
media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_*
RC_TYPE is confusing and it's just the protocol. So rename it.
Suggested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Sean Young <sean@mess.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
518f4b26 |
| 01-Jul-2017 |
Sean Young <sean@mess.org> |
media: rc-core: rename input_name to device_name
When an ir-spi is registered, you get this message.
rc rc0: Unspecified device as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.12
media: rc-core: rename input_name to device_name
When an ir-spi is registered, you get this message.
rc rc0: Unspecified device as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.128/rc/rc0
"Unspecified device" refers to input_name, which makes no sense for IR TX only devices. So, rename to device_name.
Also make driver_name const char* so that no casts are needed anywhere.
Now ir-spi reports:
rc rc0: IR SPI as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.128/rc/rc0
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
1250a85b |
| 24-Jun-2017 |
Mauro Carvalho Chehab <mchehab@s-opensource.com> |
media: Replace initalized ->initialized
While committing a change on em28xx, I got a warning of a typo there. So, fix it on em28xx and on two other media drivers with the same typo.
Signed-off-by:
media: Replace initalized ->initialized
While committing a change on em28xx, I got a warning of a typo there. So, fix it on em28xx and on two other media drivers with the same typo.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
0f7499fd |
| 16-Dec-2016 |
Andi Shyti <andi.shyti@samsung.com> |
[media] rc-main: assign driver type during allocation
The driver type can be assigned immediately when an RC device requests to the framework to allocate the device.
This is an 'enum rc_driver_type
[media] rc-main: assign driver type during allocation
The driver type can be assigned immediately when an RC device requests to the framework to allocate the device.
This is an 'enum rc_driver_type' data type and specifies whether the device is a raw receiver or scancode receiver. The type will be given as parameter to the rc_allocate_device device.
Change accordingly all the drivers calling rc_allocate_device() so that the device type is specified during the rc device allocation. Whenever the device type is not specified, it will be set as RC_DRIVER_SCANCODE which was the default '0' value.
Suggested-by: Sean Young <sean@mess.org> Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
17809ed2 |
| 02-Dec-2016 |
Sean Young <sean@mess.org> |
[media] em28xx: IR protocol not reported correctly
Report the correct NEC variant.
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
#
c6d48134 |
| 07-Dec-2016 |
Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
[media] em28xx: don't store usb_device at struct em28xx
Now that we're storing usb_interface at em28xx struct, there's no good reason to keep storing usb_device, as we can get it from usb_interface.
[media] em28xx: don't store usb_device at struct em28xx
Now that we're storing usb_interface at em28xx struct, there's no good reason to keep storing usb_device, as we can get it from usb_interface. So, get rid of it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
29b05e22 |
| 07-Dec-2016 |
Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
[media] em28xx: use usb_interface for dev_foo() calls
The usb_device->dev is not the right device for dev_foo() calls. Instead, it should use usb_interface->dev.
Tested-by: Antti Palosaari <crope@i
[media] em28xx: use usb_interface for dev_foo() calls
The usb_device->dev is not the right device for dev_foo() calls. Instead, it should use usb_interface->dev.
Tested-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
ce8591ff |
| 20-Oct-2016 |
Mauro Carvalho Chehab <mchehab@s-opensource.com> |
[media] em28xx: convert it from pr_foo() to dev_foo()
Instead of using pr_foo(), use dev_foo(), with provides a better output. As this device is a multi-interface one, we'll set the device name to s
[media] em28xx: convert it from pr_foo() to dev_foo()
Instead of using pr_foo(), use dev_foo(), with provides a better output. As this device is a multi-interface one, we'll set the device name to show the chipset and the driver used.
While here, get rid of printk continuation messages.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
2a96f60e |
| 12-Oct-2016 |
Mauro Carvalho Chehab <mchehab@s-opensource.com> |
[media] em28xx: convert the remaining printks to pr_foo
There are still several places with printk's called directly.
Convert them to pr_foo() macros, except for the debug printk's, as those are en
[media] em28xx: convert the remaining printks to pr_foo
There are still several places with printk's called directly.
Convert them to pr_foo() macros, except for the debug printk's, as those are enabled via modprobe vars.
While here, realign the pr_foo() arguments to match the recommended CodingStyle.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
8314d402 |
| 12-Oct-2016 |
Mauro Carvalho Chehab <mchehab@s-opensource.com> |
[media] em28xx: use pr_foo instead of em28xx-specific printk macros
There's no reason to keep using em28xx-specific printk macros here. Just use pr_foo().
Signed-off-by: Mauro Carvalho Chehab <mche
[media] em28xx: use pr_foo instead of em28xx-specific printk macros
There's no reason to keep using em28xx-specific printk macros here. Just use pr_foo().
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
5ccb197d |
| 12-Oct-2016 |
Mauro Carvalho Chehab <mchehab@s-opensource.com> |
[media] em28xx: don't break long lines
Due to the 80-cols checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to
[media] em28xx: don't break long lines
Due to the 80-cols checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code. So, join those continuation lines.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
show more ...
|
#
ebfd59cf |
| 20-Dec-2014 |
Russell King <rmk+kernel@arm.linux.org.uk> |
[media] em28xx-input: fix missing newlines
Inspection shows that newlines are missing from several kernel messages in em28xx-input. Fix these.
Fixes: 5025076aadfe ("[media] em28xx-input: implement
[media] em28xx-input: fix missing newlines
Inspection shows that newlines are missing from several kernel messages in em28xx-input. Fix these.
Fixes: 5025076aadfe ("[media] em28xx-input: implement em28xx_ops: suspend/resume hooks")
Cc: <stable@vger.kernel.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
show more ...
|
#
0418ca60 |
| 20-Dec-2014 |
Russell King <rmk+kernel@arm.linux.org.uk> |
[media] em28xx: ensure "closing" messages terminate with a newline
The lockdep splat addressed in a previous commit revealed that at least one message in em28xx-input.c was missing a new line:
em28
[media] em28xx: ensure "closing" messages terminate with a newline
The lockdep splat addressed in a previous commit revealed that at least one message in em28xx-input.c was missing a new line:
em28178 #0: Closing input extensionINFO: trying to register non-static key.
Further inspection shows several other messages also miss a new line. These will be fixed in a subsequent patch.
Fixes: aa929ad783c0 ("[media] em28xx: print a message at disconnect")
Cc: <stable@vger.kernel.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
show more ...
|