Skip to content

Commit 87cd0fa

Browse files
Shuah Khanmchehab
authored andcommitted
[media] media: dvb-core add new flag exit flag value for resume
Some fe drivers will have to do additional initialization in their fe ops.init interfaces when called during resume. Without the additional initialization, fe and tuner driver resume fails. A new fe exit flag value DVB_FE_DEVICE_RESUME is necessary to detect resume case. This patch adds a new define and changes dvb_frontend_resume() to set it prior to calling fe init and tuner init calls and resets it back to DVB_FE_NO_EXIT once fe and tuner init is done. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
1 parent 5b22b1a commit 87cd0fa

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/media/dvb-core/dvb_frontend.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2568,12 +2568,14 @@ int dvb_frontend_resume(struct dvb_frontend *fe)
25682568
dev_dbg(fe->dvb->device, "%s: adap=%d fe=%d\n", __func__, fe->dvb->num,
25692569
fe->id);
25702570

2571+
fe->exit = DVB_FE_DEVICE_RESUME;
25712572
if (fe->ops.init)
25722573
ret = fe->ops.init(fe);
25732574

25742575
if (fe->ops.tuner_ops.init)
25752576
ret = fe->ops.tuner_ops.init(fe);
25762577

2578+
fe->exit = DVB_FE_NO_EXIT;
25772579
fepriv->state = FESTATE_RETUNE;
25782580
dvb_frontend_wakeup(fe);
25792581

‎drivers/media/dvb-core/dvb_frontend.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ struct dtv_frontend_properties {
408408
#define DVB_FE_NO_EXIT 0
409409
#define DVB_FE_NORMAL_EXIT 1
410410
#define DVB_FE_DEVICE_REMOVED 2
411+
#define DVB_FE_DEVICE_RESUME 3
411412

412413
struct dvb_frontend {
413414
struct dvb_frontend_ops ops;

0 commit comments

Comments
 (0)