]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: bcm: Cleanup unneeded boolean comparisons
authorJade Bilkey <herself@thefumon.com>
Mon, 17 Mar 2014 23:45:28 +0000 (19:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Mar 2014 18:48:42 +0000 (11:48 -0700)
Cleans up a few needless comparisons with booleans and cleans up an
interupt handler to take advantage of earlier bailout shortcircuit.

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm/InterfaceIsr.c

index 9df4838ec0739759df5d9d6c37c7c9c45ac7b8ce..b9f8a7aa24fedaa0825a48b83ad804af8ee65b4a 100644 (file)
@@ -12,14 +12,13 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/)
                pr_info(PFX "%s: interrupt status %d\n",
                                Adapter->dev->name, status);
 
-       if (Adapter->device_removed == TRUE) {
+       if (Adapter->device_removed) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, INTF_INIT,
                                DBG_LVL_ALL, "Device has Got Removed.");
                return;
        }
 
-       if (((Adapter->bPreparingForLowPowerMode == TRUE) &&
-                               (Adapter->bDoSuspend == TRUE)) ||
+       if ((Adapter->bPreparingForLowPowerMode && Adapter->bDoSuspend) ||
                        psIntfAdapter->bSuspended ||
                        psIntfAdapter->bPreparingForBusSuspend) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, INTF_INIT,
@@ -65,7 +64,7 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/)
                                psIntfAdapter->psAdapter->downloadDDR += 1;
                                wake_up(&Adapter->tx_packet_wait_queue);
                        }
-                       if (false == Adapter->waiting_to_fw_download_done) {
+                       if (!Adapter->waiting_to_fw_download_done) {
                                Adapter->waiting_to_fw_download_done = TRUE;
                                wake_up(&Adapter->ioctl_fw_dnld_wait_queue);
                        }
@@ -168,13 +167,13 @@ INT StartInterruptUrb(struct bcm_interface_adapter *psIntfAdapter)
 {
        INT status = 0;
 
-       if (false == psIntfAdapter->psAdapter->device_removed &&
-           false == psIntfAdapter->psAdapter->bEndPointHalted &&
-           false == psIntfAdapter->bSuspended &&
-           false == psIntfAdapter->bPreparingForBusSuspend &&
-           false == psIntfAdapter->psAdapter->StopAllXaction) {
+       if (!(psIntfAdapter->psAdapter->device_removed ||
+                               psIntfAdapter->psAdapter->bEndPointHalted ||
+                               psIntfAdapter->bSuspended ||
+                               psIntfAdapter->bPreparingForBusSuspend ||
+                               psIntfAdapter->psAdapter->StopAllXaction)) {
                status =
-                   usb_submit_urb(psIntfAdapter->psInterruptUrb, GFP_ATOMIC);
+                       usb_submit_urb(psIntfAdapter->psInterruptUrb, GFP_ATOMIC);
                if (status) {
                        BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
                                        DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,