diff options
author | Shuah Khan <shuah.kh@samsung.com> | 2014-07-12 13:44:13 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-26 11:18:57 -0300 |
commit | f68e35af99cfbefdd250e37d4d9ba778d67e253d (patch) | |
tree | 92fc5c7845c0282f646f5ef4586884050bc817ae /drivers/media | |
parent | 18ed2860cb1345c1c99f62b089a15ac858f7bd48 (diff) |
[media] media: em28xx-dvb update fe exit flag to indicate device disconnect
Change em28xx_dvb_fini() to set fe exit flag to DVB_FE_DEVICE_REMOVED
when device is disconnected. em28xx maintains device disconnect status
in em28xx device. fe drivers will be able to now check the fe exit
status to avoid accessing the device, from their release interfaces
when called from disconnect path. This change depends on dvb-core
change that exports fe exit flag by moving it from fepriv to fe.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-dvb.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c index 2cf34efc9517..3a3e243edf89 100644 --- a/drivers/media/usb/em28xx/em28xx-dvb.c +++ b/drivers/media/usb/em28xx/em28xx-dvb.c @@ -1654,10 +1654,14 @@ static int em28xx_dvb_fini(struct em28xx *dev) if (dev->disconnected) { /* We cannot tell the device to sleep * once it has been unplugged. */ - if (dvb->fe[0]) + if (dvb->fe[0]) { prevent_sleep(&dvb->fe[0]->ops); - if (dvb->fe[1]) + dvb->fe[0]->exit = DVB_FE_DEVICE_REMOVED; + } + if (dvb->fe[1]) { prevent_sleep(&dvb->fe[1]->ops); + dvb->fe[1]->exit = DVB_FE_DEVICE_REMOVED; + } } /* remove I2C tuner */ |