Skip to content

Commit

Permalink
[media] media: em28xx-dvb update fe exit flag to indicate device disc…
Browse files Browse the repository at this point in the history
…onnect

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>
  • Loading branch information
Shuah Khan authored and Mauro Carvalho Chehab committed Jul 26, 2014
1 parent 18ed286 commit f68e35a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/media/usb/em28xx/em28xx-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit f68e35a

Please sign in to comment.