linux/drivers/media
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
..
cec media: cec-notifier: add new notifier functions 2019-06-27 07:19:43 -04:00
common media: v4l2-tpg: add support for new pixelformats 2019-07-30 12:16:45 -04:00
dvb-core media: don't drop front-end reference count for ->detach 2019-08-04 06:33:11 -03:00
dvb-frontends media: si2168: add support for Mygica T230C v2 2019-07-22 15:30:28 -04:00
firewire treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
i2c media: ov2680: fix a typo in a function name 2019-07-25 06:44:39 -04:00
mc Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
mmc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pci media: ipu3-cio2: Parse information from firmware without using callbacks 2019-07-25 11:01:24 -04:00
platform media: via-camera: convert to the vb2 framework 2019-07-30 12:18:34 -04:00
radio media: radio-raremono: change devm_k*alloc to k*alloc 2019-06-27 07:35:24 -04:00
rc media: mceusb: USB reset device following USB clear halt error 2019-07-22 15:29:53 -04:00
spi Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
tuners media updates for v5.3-rc1 2019-07-09 09:47:22 -07:00
usb media: don't drop front-end reference count for ->detach 2019-08-04 06:33:11 -03:00
v4l2-core media: v4l2-common: add support for new RGB32 pixelformats 2019-07-30 12:17:08 -04:00
Kconfig media: Don't default-enable "ancillary driver autoselect" if EMBEDDED 2019-07-25 11:48:22 -04:00
Makefile media: move drivers/media/media-* to drivers/media/mc/mc-* 2019-05-28 12:15:46 -04:00