summaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm
diff options
context:
space:
mode:
authorJade Bilkey <herself@thefumon.com>2014-03-17 19:45:31 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-18 11:48:42 -0700
commit9b14459654299163eba6ac53c8f616fd8c2fd17a (patch)
treeeb4d69f2ef4c701457865ea91f1b2e6ff4522d3b /drivers/staging/bcm
parent6246432f73211e1c5fc5383d3922540f9f9bb9ef (diff)
downloadlinux-9b14459654299163eba6ac53c8f616fd8c2fd17a.tar.gz
linux-9b14459654299163eba6ac53c8f616fd8c2fd17a.tar.bz2
linux-9b14459654299163eba6ac53c8f616fd8c2fd17a.zip
staging: bcm: Remove unneeded boolean comparisons and reflow lines
Removes needless boolean TRUE and false comparisons and reflows some lines to eliminate over 80 character if statments. Signed-off-by: Jade Bilkey <herself@thefumon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/bcm')
-rw-r--r--drivers/staging/bcm/InterfaceInit.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm/InterfaceInit.c
index 93934e515f2a..7c04c73e3bc8 100644
--- a/drivers/staging/bcm/InterfaceInit.c
+++ b/drivers/staging/bcm/InterfaceInit.c
@@ -74,6 +74,7 @@ static void ConfigureEndPointTypesThroughEEPROM(struct bcm_mini_adapter *Adapter
{
u32 ulReg;
int bytes;
+ struct bcm_interface_adapter *interfaceAdapter;
/* Program EP2 MAX_PKT_SIZE */
ulReg = ntohl(EP2_MPS_REG);
@@ -83,7 +84,9 @@ static void ConfigureEndPointTypesThroughEEPROM(struct bcm_mini_adapter *Adapter
ulReg = ntohl(EP2_CFG_REG);
BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x132, 4, TRUE);
- if (((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter))->bHighSpeedDevice == TRUE) {
+ interfaceAdapter =
+ (struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter);
+ if (interfaceAdapter->bHighSpeedDevice) {
ulReg = ntohl(EP2_CFG_INT);
BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x136, 4, TRUE);
} else {
@@ -341,7 +344,7 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter)
pr_err(DRV_NAME "InitCardAndDownloadFirmware failed.\n");
return status;
}
- if (TRUE == psIntfAdapter->psAdapter->fw_download_done) {
+ if (psIntfAdapter->psAdapter->fw_download_done) {
if (StartInterruptUrb(psIntfAdapter)) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
DBG_TYPE_INITEXIT, DRV_ENTRY,
@@ -432,8 +435,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
DBG_TYPE_INITEXIT, DRV_ENTRY,
DBG_LVL_ALL,
"BCM16 is applicable on this dongle\n");
- if (retval ||
- (psIntfAdapter->bHighSpeedDevice == false)) {
+ if (retval || !psIntfAdapter->bHighSpeedDevice) {
usedIntOutForBulkTransfer = EP2;
endpoint = &iface_desc->endpoint[EP2].desc;
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
@@ -447,8 +449,10 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
* If Mode is FS then EP2 should be bulk end
* point
*/
- if (((psIntfAdapter->bHighSpeedDevice == TRUE) && (usb_endpoint_is_int_out(endpoint) == false)) ||
- ((psIntfAdapter->bHighSpeedDevice == false) && (usb_endpoint_is_bulk_out(endpoint) == false))) {
+ if ((psIntfAdapter->bHighSpeedDevice &&
+ !usb_endpoint_is_int_out(endpoint)) ||
+ (!psIntfAdapter->bHighSpeedDevice &&
+ !usb_endpoint_is_bulk_out(endpoint))) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
DBG_TYPE_INITEXIT,
DRV_ENTRY, DBG_LVL_ALL,
@@ -475,7 +479,8 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
}
}
- if ((psIntfAdapter->bHighSpeedDevice == false) && usb_endpoint_is_bulk_out(endpoint)) {
+ if (!psIntfAdapter->bHighSpeedDevice &&
+ usb_endpoint_is_bulk_out(endpoint)) {
/* Once BULK is selected in FS mode. Revert it back to INT. Else USB_IF will fail. */
UINT _uiData = ntohl(EP2_CFG_INT);
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
@@ -494,7 +499,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
DBG_TYPE_INITEXIT, DRV_ENTRY,
DBG_LVL_ALL,
"Choosing AltSetting as a default setting.\n");
- if (usb_endpoint_is_int_out(endpoint) == false) {
+ if (!usb_endpoint_is_int_out(endpoint)) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
DBG_TYPE_INITEXIT,
DRV_ENTRY, DBG_LVL_ALL,
@@ -627,7 +632,7 @@ static int InterfaceSuspend(struct usb_interface *intf, pm_message_t message)
psIntfAdapter->bSuspended = TRUE;
- if (TRUE == psIntfAdapter->bPreparingForBusSuspend) {
+ if (psIntfAdapter->bPreparingForBusSuspend) {
psIntfAdapter->bPreparingForBusSuspend = false;
if (psIntfAdapter->psAdapter->LinkStatus == LINKUP_DONE) {