Skip to content

Commit

Permalink
[media] media: dvb-core add new flag exit flag value for resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shuah Khan authored and Mauro Carvalho Chehab committed Jul 26, 2014
1 parent 5b22b1a commit 87cd0fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -2568,12 +2568,14 @@ int dvb_frontend_resume(struct dvb_frontend *fe)
dev_dbg(fe->dvb->device, "%s: adap=%d fe=%d\n", __func__, fe->dvb->num,
fe->id);

fe->exit = DVB_FE_DEVICE_RESUME;
if (fe->ops.init)
ret = fe->ops.init(fe);

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

fe->exit = DVB_FE_NO_EXIT;
fepriv->state = FESTATE_RETUNE;
dvb_frontend_wakeup(fe);

Expand Down
1 change: 1 addition & 0 deletions drivers/media/dvb-core/dvb_frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ struct dtv_frontend_properties {
#define DVB_FE_NO_EXIT 0
#define DVB_FE_NORMAL_EXIT 1
#define DVB_FE_DEVICE_REMOVED 2
#define DVB_FE_DEVICE_RESUME 3

struct dvb_frontend {
struct dvb_frontend_ops ops;
Expand Down

0 comments on commit 87cd0fa

Please sign in to comment.