]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
au0828: Fix dev_state handling
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 22 Mar 2016 12:21:57 +0000 (09:21 -0300)
committerTim Gardner <tim.gardner@canonical.com>
Thu, 21 Apr 2016 13:20:33 +0000 (07:20 -0600)
commitc31f0821640891656890519b8db21603085bc036
treeeb741bbd7c09e313681f543b7dd05d0a154d326c
parentccab18da268a60f504b459f08b5ebbf5efd45778
au0828: Fix dev_state handling

BugLink: http://bugs.launchpad.net/bugs/1573034
commit e8e3039f5b941f7825d335f8ca11c12a8104db11 upstream.

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."

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/media/usb/au0828/au0828-core.c
drivers/media/usb/au0828/au0828-input.c
drivers/media/usb/au0828/au0828-video.c
drivers/media/usb/au0828/au0828.h