linux/drivers/media/usb
Arnd Bergmann 14e3cdbb00 media: don't drop front-end reference count for ->detach
A bugfix introduce a link failure in configurations without CONFIG_MODULES:

In file included from drivers/media/usb/dvb-usb/pctv452e.c:20:0:
drivers/media/usb/dvb-usb/pctv452e.c: In function 'pctv452e_frontend_attach':
drivers/media/dvb-frontends/stb0899_drv.h:151:36: error: weak declaration of 'stb0899_attach' being applied to a already existing, static definition

The problem is that the !IS_REACHABLE() declaration of stb0899_attach()
is a 'static inline' definition that clashes with the weak definition.

I further observed that the bugfix was only done for one of the five users
of stb0899_attach(), the other four still have the problem.  This reverts
the bugfix and instead addresses the problem by not dropping the reference
count when calling '->detach()', instead we call this function directly
in dvb_frontend_put() before dropping the kref on the front-end.

I first submitted this in early 2018, and after some discussion it
was apparently discarded.  While there is a long-term plan in place,
that plan is obviously not nearing completion yet, and the current
kernel is still broken unless this patch is applied.

Link: https://patchwork.kernel.org/patch/10140175/
Link: https://patchwork.linuxtv.org/patch/54831/

Cc: Max Kellermann <max.kellermann@gmail.com>
Cc: Wolfgang Rohdewald <wolfgang@rohdewald.de>
Cc: stable@vger.kernel.org
Fixes: f686c14364 ("[media] stb0899: move code to "detach" callback")
Fixes: 6cdeaed3b1 ("media: dvb_usb_pctv452e: module refcount changes were unbalanced")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-08-04 06:33:11 -03:00
..
airspy media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
as102 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118 2019-05-24 17:39:02 +02:00
au0828 media: drivers/media: don't set pix->priv = 0 2019-07-23 08:48:33 -04:00
b2c2 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cpia2 media: drivers/media: don't set pix->priv = 0 2019-07-23 08:48:33 -04:00
cx231xx media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
dvb-usb media: don't drop front-end reference count for ->detach 2019-08-04 06:33:11 -03:00
dvb-usb-v2 media: dvbsky: add support for Mygica T230C v2 2019-07-22 15:33:30 -04:00
em28xx media: drivers/media: don't set pix->priv = 0 2019-07-23 08:48:33 -04:00
go7007 media: go7007: Fix misuse of strscpy 2019-07-23 08:53:08 -04:00
gspca media: drivers/media: don't set pix->priv = 0 2019-07-23 08:48:33 -04:00
hackrf Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
hdpvr media: hdpvr: Add device num check and handling 2019-07-25 06:23:35 -04:00
msi2500 media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
pulse8-cec treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 55 2019-05-24 17:36:42 +02:00
pvrusb2 media updates for v5.3-rc1 2019-07-09 09:47:22 -07:00
pwc media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
rainshadow-cec treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 55 2019-05-24 17:36:42 +02:00
s2255 media: drivers/media: don't set pix->priv = 0 2019-07-23 08:48:33 -04:00
siano USB fixes for 5.2-rc3 2019-05-31 08:16:31 -07:00
stk1160 media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
stkwebcam media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
tm6000 media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
ttusb-budget treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ttusb-dec treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
usbtv media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
usbvision media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
uvc media: drivers/media: don't set pix->priv = 0 2019-07-23 08:48:33 -04:00
zr364xx media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile