Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Shuah Khan and committed by
Mauro Carvalho Chehab
87cd0fa8 5b22b1a4

+3
+2
drivers/media/dvb-core/dvb_frontend.c
··· 2568 2568 dev_dbg(fe->dvb->device, "%s: adap=%d fe=%d\n", __func__, fe->dvb->num, 2569 2569 fe->id); 2570 2570 2571 + fe->exit = DVB_FE_DEVICE_RESUME; 2571 2572 if (fe->ops.init) 2572 2573 ret = fe->ops.init(fe); 2573 2574 2574 2575 if (fe->ops.tuner_ops.init) 2575 2576 ret = fe->ops.tuner_ops.init(fe); 2576 2577 2578 + fe->exit = DVB_FE_NO_EXIT; 2577 2579 fepriv->state = FESTATE_RETUNE; 2578 2580 dvb_frontend_wakeup(fe); 2579 2581
+1
drivers/media/dvb-core/dvb_frontend.h
··· 408 408 #define DVB_FE_NO_EXIT 0 409 409 #define DVB_FE_NORMAL_EXIT 1 410 410 #define DVB_FE_DEVICE_REMOVED 2 411 + #define DVB_FE_DEVICE_RESUME 3 411 412 412 413 struct dvb_frontend { 413 414 struct dvb_frontend_ops ops;