aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShuah Khan <shuah.kh@samsung.com>2014-07-12 12:44:13 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-26 10:18:57 -0400
commitf68e35af99cfbefdd250e37d4d9ba778d67e253d (patch)
tree92fc5c7845c0282f646f5ef4586884050bc817ae
parent18ed2860cb1345c1c99f62b089a15ac858f7bd48 (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>
-rw-r--r--drivers/media/usb/em28xx/em28xx-dvb.c8
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)
1654 if (dev->disconnected) { 1654 if (dev->disconnected) {
1655 /* We cannot tell the device to sleep 1655 /* We cannot tell the device to sleep
1656 * once it has been unplugged. */ 1656 * once it has been unplugged. */
1657 if (dvb->fe[0]) 1657 if (dvb->fe[0]) {
1658 prevent_sleep(&dvb->fe[0]->ops); 1658 prevent_sleep(&dvb->fe[0]->ops);
1659 if (dvb->fe[1]) 1659 dvb->fe[0]->exit = DVB_FE_DEVICE_REMOVED;
1660 }
1661 if (dvb->fe[1]) {
1660 prevent_sleep(&dvb->fe[1]->ops); 1662 prevent_sleep(&dvb->fe[1]->ops);
1663 dvb->fe[1]->exit = DVB_FE_DEVICE_REMOVED;
1664 }
1661 } 1665 }
1662 1666
1663 /* remove I2C tuner */ 1667 /* remove I2C tuner */