From f969f84ed92e55040dbf51398ba2d8f5d23bf498 Mon Sep 17 00:00:00 2001 From: Kevin McKinney Date: Mon, 10 Oct 2011 21:01:48 -0400 Subject: [PATCH] Staging: bcm: Fix coding style issues reported by checkpatch.pl This patch cleans up several code style issues found in InterfaceInit.c reported by checkpatch.pl. Signed-off-by: Kevin McKinney Signed-off-by: Greg Kroah-Hartman --- drivers/staging/bcm/InterfaceInit.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm/InterfaceInit.c index d78d5ef1f298..36991f7cbf33 100644 --- a/drivers/staging/bcm/InterfaceInit.c +++ b/drivers/staging/bcm/InterfaceInit.c @@ -139,8 +139,7 @@ static void ConfigureEndPointTypesThroughEEPROM(PMINI_ADAPTER Adapter) BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1C2, 4, TRUE); } -static int -usbbcm_device_probe(struct usb_interface *intf, const struct usb_device_id *id) +static int usbbcm_device_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct usb_device *udev = interface_to_usbdev(intf); int retval; @@ -389,32 +388,32 @@ static inline int bcm_usb_endpoint_xfer_isoc(const struct usb_endpoint_descripto static inline int bcm_usb_endpoint_is_bulk_in(const struct usb_endpoint_descriptor *epd) { - return (bcm_usb_endpoint_xfer_bulk(epd) && bcm_usb_endpoint_dir_in(epd)); + return bcm_usb_endpoint_xfer_bulk(epd) && bcm_usb_endpoint_dir_in(epd); } static inline int bcm_usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd) { - return (bcm_usb_endpoint_xfer_bulk(epd) && bcm_usb_endpoint_dir_out(epd)); + return bcm_usb_endpoint_xfer_bulk(epd) && bcm_usb_endpoint_dir_out(epd); } static inline int bcm_usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd) { - return (bcm_usb_endpoint_xfer_int(epd) && bcm_usb_endpoint_dir_in(epd)); + return bcm_usb_endpoint_xfer_int(epd) && bcm_usb_endpoint_dir_in(epd); } static inline int bcm_usb_endpoint_is_int_out(const struct usb_endpoint_descriptor *epd) { - return (bcm_usb_endpoint_xfer_int(epd) && bcm_usb_endpoint_dir_out(epd)); + return bcm_usb_endpoint_xfer_int(epd) && bcm_usb_endpoint_dir_out(epd); } static inline int bcm_usb_endpoint_is_isoc_in(const struct usb_endpoint_descriptor *epd) { - return (bcm_usb_endpoint_xfer_isoc(epd) && bcm_usb_endpoint_dir_in(epd)); + return bcm_usb_endpoint_xfer_isoc(epd) && bcm_usb_endpoint_dir_in(epd); } static inline int bcm_usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor *epd) { - return (bcm_usb_endpoint_xfer_isoc(epd) && bcm_usb_endpoint_dir_out(epd)); + return bcm_usb_endpoint_xfer_isoc(epd) && bcm_usb_endpoint_dir_out(epd); } static int InterfaceAdapterInit(PS_INTERFACE_ADAPTER psIntfAdapter) @@ -462,7 +461,7 @@ static int InterfaceAdapterInit(PS_INTERFACE_ADAPTER psIntfAdapter) if (bBcm16 == TRUE) { /* selecting alternate setting one as a default setting for High Speed modem. */ if (psIntfAdapter->bHighSpeedDevice) - retval= usb_set_interface(psIntfAdapter->udev, DEFAULT_SETTING_0, ALTERNATE_SETTING_1); + retval = usb_set_interface(psIntfAdapter->udev, DEFAULT_SETTING_0, ALTERNATE_SETTING_1); BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "BCM16 is applicable on this dongle\n"); if (retval || (psIntfAdapter->bHighSpeedDevice == FALSE)) { @@ -497,7 +496,7 @@ static int InterfaceAdapterInit(PS_INTERFACE_ADAPTER psIntfAdapter) if ((psIntfAdapter->bHighSpeedDevice == FALSE) && bcm_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, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, + BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Reverting Bulk to INT as it is in Full Speed mode.\n"); BeceemEEPROMBulkWrite(psIntfAdapter->psAdapter, (PUCHAR)&_uiData, 0x136, 4, TRUE); } @@ -579,7 +578,7 @@ static int InterfaceAdapterInit(PS_INTERFACE_ADAPTER psIntfAdapter) psIntfAdapter->sIntrOut.int_out_size = buffer_size; psIntfAdapter->sIntrOut.int_out_endpointAddr = endpoint->bEndpointAddress; psIntfAdapter->sIntrOut.int_out_interval = endpoint->bInterval; - psIntfAdapter->sIntrOut.int_out_buffer= kmalloc(buffer_size, GFP_KERNEL); + psIntfAdapter->sIntrOut.int_out_buffer = kmalloc(buffer_size, GFP_KERNEL); if (!psIntfAdapter->sIntrOut.int_out_buffer) { dev_err(&psIntfAdapter->udev->dev, "could not allocate interrupt_out_buffer\n"); @@ -641,8 +640,8 @@ static int InterfaceSuspend(struct usb_interface *intf, pm_message_t message) static int InterfaceResume(struct usb_interface *intf) { PS_INTERFACE_ADAPTER psIntfAdapter = usb_get_intfdata(intf); - mdelay(100); + mdelay(100); psIntfAdapter->bSuspended = FALSE; StartInterruptUrb(psIntfAdapter);