xhci: unify cycle state toggling operation with 'XOR'
authorLin Wang <lin.x.wang@intel.com>
Tue, 17 Mar 2015 16:32:21 +0000 (18:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 15:21:14 +0000 (16:21 +0100)
commite5401bf37a69620bdf079e4ee6c30a268f06f04b
treed17949a17d99c022cb88c6602a3146fc9f4076f9
parent8f7e9473ab62139c78eb834f53c4ec6bc22d111f
xhci: unify cycle state toggling operation with 'XOR'

Some toggling operation in xHCI driver still use conditional toggling:
ring->cycle_state = (ring->cycle_state ? 0 : 1);

Use XOR to invert the cycle state instead of a conditional toggle to unify
cycle state toggling operation in xHCI driver.

Signed-off-by: Lin Wang <lin.x.wang@intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c