diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-03-22 09:21:57 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-03-31 15:01:35 -0300 |
commit | e8e3039f5b941f7825d335f8ca11c12a8104db11 (patch) | |
tree | c5a83551b6f871ed83fb42f23c5a4ebef9bca1cb /drivers/media/usb/au0828/au0828-core.c | |
parent | ed940cd27416f9887864b95e1f8f8845aa9d6391 (diff) | |
download | linux-next-e8e3039f5b941f7825d335f8ca11c12a8104db11.tar.gz |
[media] au0828: Fix dev_state handling
The au0828 dev_state is actually a bit mask. It should not be
checking with "==" but, instead, with a logic and. There are some
places where it was doing it wrong.
Fix that by replacing the dev_state set/clear/test with the
bitops.
As reviewed by Shuah:
"Looks good. Tested running bind/unbind au0828 loop for 1000 times.
Didn't see any problems and the v4l2_querycap() problem has been
fixed with this patch.
After the above test, ran bind/unbind snd_usb_audio 1000 times.
Didn't see any problems. Generated media graph and the graph
looks good."
Cc: stable@vger.kernel.org
Reviewed-by: Shuah Khan <shuahkh@osg.samsung.com>
Tested-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/au0828/au0828-core.c')
-rw-r--r-- | drivers/media/usb/au0828/au0828-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c index 2fcd17d9b1a6..a40958ad8341 100644 --- a/drivers/media/usb/au0828/au0828-core.c +++ b/drivers/media/usb/au0828/au0828-core.c @@ -171,7 +171,7 @@ static void au0828_usb_disconnect(struct usb_interface *interface) Set the status so poll routines can check and avoid access after disconnect. */ - dev->dev_state = DEV_DISCONNECTED; + set_bit(DEV_DISCONNECTED, &dev->dev_state); au0828_rc_unregister(dev); /* Digital TV */ |