[media] af9033: Don't export functions for the hardware filter

Exporting functions for hardware filter is a bad idea, as it
breaks compilation if:
	CONFIG_DVB_USB_AF9035=y
	CONFIG_DVB_AF9033=m

Because the PID filter function calls would be hardcoded at
af9035.

The same doesn't happen with af9033_attach() because the
dvb_attach() doesn't hardcode it. Instead, it dynamically
links it at runtime.

However, calling dvb_attach() multiple times is problematic,
as it increments module kref.

So, the better is to pass one parameter for the af9033 module
to fill the hardware filters, and then use it inside af9035.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
此提交包含在:
Mauro Carvalho Chehab
2014-03-14 14:29:06 -03:00
父節點 b24c2b4fb1
當前提交 ed97a6fe53
共有 4 個檔案被更改,包括 33 行新增16 行删除

查看文件

@@ -963,7 +963,7 @@ static int af9035_frontend_attach(struct dvb_usb_adapter *adap)
/* attach demodulator */
adap->fe[0] = dvb_attach(af9033_attach, &state->af9033_config[adap->id],
&d->i2c_adap);
&d->i2c_adap, &state->ops);
if (adap->fe[0] == NULL) {
ret = -ENODEV;
goto err;
@@ -1373,13 +1373,17 @@ static int af9035_get_stream_config(struct dvb_frontend *fe, u8 *ts_type,
static int af9035_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff)
{
return af9033_pid_filter_ctrl(adap->fe[0], onoff);
struct state *state = adap_to_priv(adap);
return state->ops.pid_filter_ctrl(adap->fe[0], onoff);
}
static int af9035_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid,
int onoff)
{
return af9033_pid_filter(adap->fe[0], index, pid, onoff);
struct state *state = adap_to_priv(adap);
return state->ops.pid_filter(adap->fe[0], index, pid, onoff);
}
static int af9035_probe(struct usb_interface *intf,