Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: em28xx: add special case for legacy gpiolib interface

The em28xx driver uses the old-style gpio_request_one() interface to
switch the lna on the PCTV 290E card.

This interface is becoming optional and should no longer be called by
portable drivers. As I could not figure out an obvious replacement,
select the new GPIOLIB_LEGACY symbol as a workaround.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Arnd Bergmann and committed by
Hans Verkuil
d5d299e7 7fa37ba2

+3 -2
+1
drivers/media/usb/em28xx/Kconfig
··· 68 68 select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT 69 69 select MEDIA_TUNER_MT2060 if MEDIA_SUBDRV_AUTOSELECT 70 70 select DVB_MXL692 if MEDIA_SUBDRV_AUTOSELECT 71 + select GPIOLIB_LEGACY if GPIOLIB && DVB_CXD2820R 71 72 help 72 73 This adds support for DVB cards based on the 73 74 Empiatech em28xx chips.
+2 -2
drivers/media/usb/em28xx/em28xx-dvb.c
··· 727 727 struct dtv_frontend_properties *c = &fe->dtv_property_cache; 728 728 struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv; 729 729 struct em28xx *dev = i2c_bus->dev; 730 - #ifdef CONFIG_GPIOLIB 730 + #ifdef CONFIG_GPIOLIB_LEGACY 731 731 struct em28xx_dvb *dvb = dev->dvb; 732 732 int ret; 733 733 unsigned long flags; ··· 1705 1705 goto out_free; 1706 1706 } 1707 1707 1708 - #ifdef CONFIG_GPIOLIB 1708 + #ifdef CONFIG_GPIOLIB_LEGACY 1709 1709 /* enable LNA for DVB-T, DVB-T2 and DVB-C */ 1710 1710 result = gpio_request_one(dvb->lna_gpio, 1711 1711 GPIOF_OUT_INIT_LOW, NULL);