Skip to content

Commit

Permalink
media: mxl111sf: declare its own pads
Browse files Browse the repository at this point in the history
As we don't need anymore to share pad numbers with similar
drivers, use its own pad definition instead of a global
model.

Acked-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
mchehab committed Sep 17, 2018
1 parent 3aa1378 commit db7da96
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 5 additions & 5 deletions drivers/media/usb/dvb-usb-v2/mxl111sf.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,13 +892,13 @@ static int mxl111sf_attach_tuner(struct dvb_usb_adapter *adap)
#ifdef CONFIG_MEDIA_CONTROLLER_DVB
state->tuner.function = MEDIA_ENT_F_TUNER;
state->tuner.name = "mxl111sf tuner";
state->tuner_pads[TUNER_PAD_RF_INPUT].flags = MEDIA_PAD_FL_SINK;
state->tuner_pads[TUNER_PAD_RF_INPUT].sig_type = PAD_SIGNAL_ANALOG;
state->tuner_pads[TUNER_PAD_OUTPUT].flags = MEDIA_PAD_FL_SOURCE;
state->tuner_pads[TUNER_PAD_OUTPUT].sig_type = PAD_SIGNAL_ANALOG;
state->tuner_pads[MXL111SF_PAD_RF_INPUT].flags = MEDIA_PAD_FL_SINK;
state->tuner_pads[MXL111SF_PAD_RF_INPUT].sig_type = PAD_SIGNAL_ANALOG;
state->tuner_pads[MXL111SF_PAD_OUTPUT].flags = MEDIA_PAD_FL_SOURCE;
state->tuner_pads[MXL111SF_PAD_OUTPUT].sig_type = PAD_SIGNAL_ANALOG;

ret = media_entity_pads_init(&state->tuner,
TUNER_NUM_PADS, state->tuner_pads);
MXL111SF_NUM_PADS, state->tuner_pads);
if (ret)
return ret;

Expand Down
8 changes: 7 additions & 1 deletion drivers/media/usb/dvb-usb-v2/mxl111sf.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ struct mxl111sf_adap_state {
int (*fe_sleep)(struct dvb_frontend *);
};

enum mxl111sf_pads {
MXL111SF_PAD_RF_INPUT,
MXL111SF_PAD_OUTPUT,
MXL111SF_NUM_PADS
};

struct mxl111sf_state {
struct dvb_usb_device *d;

Expand Down Expand Up @@ -94,7 +100,7 @@ struct mxl111sf_state {
struct mutex msg_lock;
#ifdef CONFIG_MEDIA_CONTROLLER_DVB
struct media_entity tuner;
struct media_pad tuner_pads[2];
struct media_pad tuner_pads[MXL111SF_NUM_PADS];
#endif
};

Expand Down

0 comments on commit db7da96

Please sign in to comment.