diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-26 10:07:41 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-12-04 13:52:45 -0200 |
commit | a2ea5561173f5c2c14e6050b261d225acd99fa08 (patch) | |
tree | cdff8c08c5d0a7c5b321fd3427a18c271e5aefed /drivers/media/usb | |
parent | 134e7e1cb378c438cc30169313888fb3ac3b6379 (diff) |
[media] stv090x: remove export symbol for stv090x_set_gpio()
Drivers that use dvb_attach can have just one exported symbol,
or they will cause compilation breakages depending on the
selected frontends.
As Jim reported:
drivers/built-in.o: In function `technisat_usb2_set_voltage':
technisat-usb2.c:(.text+0x3b4919): undefined reference to `stv090x_set_gpio'
make: *** [vmlinux] Error 1
That happens because, on his configuration, the configuration
is:
CONFIG_DVB_USB=y
CONFIG_DVB_STV090x=m
Luis proposed ar way to fix, but that would just force the
STV090x to be selected, even if one wants to use a device
with a different frontend.
Instead, let's do the right thing: move set_gpio to the
configuration structure and fill it during dvb_attach().
This way, the driver can still call it, and dvb_attach()
will load stv090x module only if the device really needs it.
Reported by: Jim Davis <jim.epost@gmail.com>
Cc: Luis Rodriguez <mcgrof@suse.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/dvb-usb/technisat-usb2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/usb/dvb-usb/technisat-usb2.c b/drivers/media/usb/dvb-usb/technisat-usb2.c index 6b0b8b6b9e2a..5801ae7f672a 100644 --- a/drivers/media/usb/dvb-usb/technisat-usb2.c +++ b/drivers/media/usb/dvb-usb/technisat-usb2.c @@ -449,6 +449,8 @@ static int technisat_usb2_read_mac_address(struct dvb_usb_device *d, return 0; } +static struct stv090x_config technisat_usb2_stv090x_config; + /* frontend attach */ static int technisat_usb2_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) @@ -472,7 +474,8 @@ static int technisat_usb2_set_voltage(struct dvb_frontend *fe, } for (i = 0; i < 3; i++) - if (stv090x_set_gpio(fe, i+2, 0, gpio[i], 0) != 0) + if (technisat_usb2_stv090x_config.set_gpio(fe, i+2, 0, + gpio[i], 0) != 0) return -EREMOTEIO; return 0; } |