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

Staging: bcm: Replaced member accessing with variable in device_run()

Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3b068e54
...@@ -340,16 +340,16 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter) ...@@ -340,16 +340,16 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter)
{ {
int value = 0; int value = 0;
UINT status = STATUS_SUCCESS; UINT status = STATUS_SUCCESS;
struct bcm_mini_adapter *psAd = psIntfAdapter->psAdapter;
status = InitCardAndDownloadFirmware(psIntfAdapter->psAdapter); status = InitCardAndDownloadFirmware(psAd);
if (status != STATUS_SUCCESS) { if (status != STATUS_SUCCESS) {
pr_err(DRV_NAME "InitCardAndDownloadFirmware failed.\n"); pr_err(DRV_NAME "InitCardAndDownloadFirmware failed.\n");
return status; return status;
} }
if (psIntfAdapter->psAdapter->fw_download_done) { if (psAd->fw_download_done) {
if (StartInterruptUrb(psIntfAdapter)) { if (StartInterruptUrb(psIntfAdapter)) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT, DRV_ENTRY,
DBG_TYPE_INITEXIT, DRV_ENTRY,
DBG_LVL_ALL, DBG_LVL_ALL,
"Cannot send interrupt in URB\n"); "Cannot send interrupt in URB\n");
} }
...@@ -358,17 +358,15 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter) ...@@ -358,17 +358,15 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter)
* now register the cntrl interface. after downloading the f/w * now register the cntrl interface. after downloading the f/w
* waiting for 5 sec to get the mailbox interrupt. * waiting for 5 sec to get the mailbox interrupt.
*/ */
psIntfAdapter->psAdapter->waiting_to_fw_download_done = false; psAd->waiting_to_fw_download_done = false;
value = wait_event_timeout( value = wait_event_timeout(psAd->ioctl_fw_dnld_wait_queue,
psIntfAdapter->psAdapter->ioctl_fw_dnld_wait_queue, psAd->waiting_to_fw_download_done,
psIntfAdapter->psAdapter->waiting_to_fw_download_done,
5 * HZ); 5 * HZ);
if (value == 0) if (value == 0)
pr_err(DRV_NAME ": Timeout waiting for mailbox interrupt.\n"); pr_err(DRV_NAME ": Timeout waiting for mailbox interrupt.\n");
if (register_control_device_interface( if (register_control_device_interface(psAd) < 0) {
psIntfAdapter->psAdapter) < 0) {
pr_err(DRV_NAME ": Register Control Device failed.\n"); pr_err(DRV_NAME ": Register Control Device failed.\n");
return -EIO; return -EIO;
} }
......
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