Commit b4ad0f04 authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman

Staging: bcm: Merged some lines which got shorter by the latest patch

Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a02b67b6
...@@ -396,8 +396,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) ...@@ -396,8 +396,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
psAd->interface_rdm = BcmRDM; psAd->interface_rdm = BcmRDM;
psAd->interface_wrm = BcmWRM; psAd->interface_wrm = BcmWRM;
bytes = rdmalt(psAd, CHIP_ID_REG, bytes = rdmalt(psAd, CHIP_ID_REG, (u32 *) &(psAd->chip_id),
(u32 *) &(psAd->chip_id),
sizeof(u32)); sizeof(u32));
if (bytes < 0) { if (bytes < 0) {
retval = bytes; retval = bytes;
...@@ -432,16 +431,14 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) ...@@ -432,16 +431,14 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
retval = usb_set_interface(psIntfAdapter->udev, retval = usb_set_interface(psIntfAdapter->udev,
DEFAULT_SETTING_0, DEFAULT_SETTING_0,
ALTERNATE_SETTING_1); ALTERNATE_SETTING_1);
BCM_DEBUG_PRINT(psAd, BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT, DRV_ENTRY,
DBG_TYPE_INITEXIT, DRV_ENTRY,
DBG_LVL_ALL, DBG_LVL_ALL,
"BCM16 is applicable on this dongle\n"); "BCM16 is applicable on this dongle\n");
if (retval || !psIntfAdapter->bHighSpeedDevice) { if (retval || !psIntfAdapter->bHighSpeedDevice) {
usedIntOutForBulkTransfer = EP2; usedIntOutForBulkTransfer = EP2;
endpoint = &iface_desc->endpoint[EP2].desc; endpoint = &iface_desc->endpoint[EP2].desc;
BCM_DEBUG_PRINT(psAd, BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT,
DBG_TYPE_INITEXIT, DRV_ENTRY, DRV_ENTRY, DBG_LVL_ALL,
DBG_LVL_ALL,
"Interface altsetting failed or modem is configured to Full Speed, hence will work on default setting 0\n"); "Interface altsetting failed or modem is configured to Full Speed, hence will work on default setting 0\n");
/* /*
* If Modem is high speed device EP2 should be * If Modem is high speed device EP2 should be
...@@ -454,8 +451,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) ...@@ -454,8 +451,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
!usb_endpoint_is_int_out(endpoint)) || !usb_endpoint_is_int_out(endpoint)) ||
(!psIntfAdapter->bHighSpeedDevice && (!psIntfAdapter->bHighSpeedDevice &&
!usb_endpoint_is_bulk_out(endpoint))) { !usb_endpoint_is_bulk_out(endpoint))) {
BCM_DEBUG_PRINT(psAd, BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT,
DBG_TYPE_INITEXIT,
DRV_ENTRY, DBG_LVL_ALL, DRV_ENTRY, DBG_LVL_ALL,
"Configuring the EEPROM\n"); "Configuring the EEPROM\n");
/* change the EP2, EP4 to INT OUT end point */ /* change the EP2, EP4 to INT OUT end point */
...@@ -484,25 +480,21 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) ...@@ -484,25 +480,21 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
usb_endpoint_is_bulk_out(endpoint)) { usb_endpoint_is_bulk_out(endpoint)) {
/* Once BULK is selected in FS mode. Revert it back to INT. Else USB_IF will fail. */ /* Once BULK is selected in FS mode. Revert it back to INT. Else USB_IF will fail. */
UINT _uiData = ntohl(EP2_CFG_INT); UINT _uiData = ntohl(EP2_CFG_INT);
BCM_DEBUG_PRINT(psAd, BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT,
DBG_TYPE_INITEXIT,
DRV_ENTRY, DBG_LVL_ALL, DRV_ENTRY, DBG_LVL_ALL,
"Reverting Bulk to INT as it is in Full Speed mode.\n"); "Reverting Bulk to INT as it is in Full Speed mode.\n");
BeceemEEPROMBulkWrite( BeceemEEPROMBulkWrite(psAd,
psAd,
(PUCHAR) & _uiData, (PUCHAR) & _uiData,
0x136, 4, TRUE); 0x136, 4, TRUE);
} }
} else { } else {
usedIntOutForBulkTransfer = EP4; usedIntOutForBulkTransfer = EP4;
endpoint = &iface_desc->endpoint[EP4].desc; endpoint = &iface_desc->endpoint[EP4].desc;
BCM_DEBUG_PRINT(psAd, BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT,
DBG_TYPE_INITEXIT, DRV_ENTRY, DRV_ENTRY, DBG_LVL_ALL,
DBG_LVL_ALL,
"Choosing AltSetting as a default setting.\n"); "Choosing AltSetting as a default setting.\n");
if (!usb_endpoint_is_int_out(endpoint)) { if (!usb_endpoint_is_int_out(endpoint)) {
BCM_DEBUG_PRINT(psAd, BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT,
DBG_TYPE_INITEXIT,
DRV_ENTRY, DBG_LVL_ALL, DRV_ENTRY, DBG_LVL_ALL,
"Dongle does not have BCM16 Fix.\n"); "Dongle does not have BCM16 Fix.\n");
/* change the EP2, EP4 to INT OUT end point and use EP4 in altsetting */ /* change the EP2, EP4 to INT OUT end point and use EP4 in altsetting */
...@@ -608,8 +600,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) ...@@ -608,8 +600,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
usb_set_intfdata(psIntfAdapter->interface, psIntfAdapter); usb_set_intfdata(psIntfAdapter->interface, psIntfAdapter);
psAd->bcm_file_download = InterfaceFileDownload; psAd->bcm_file_download = InterfaceFileDownload;
psAd->bcm_file_readback_from_chip = psAd->bcm_file_readback_from_chip = InterfaceFileReadbackFromChip;
InterfaceFileReadbackFromChip;
psAd->interface_transmit = InterfaceTransmitPacket; psAd->interface_transmit = InterfaceTransmitPacket;
retval = CreateInterruptUrb(psIntfAdapter); retval = CreateInterruptUrb(psIntfAdapter);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment