From 9e58842f7654653b973007ee5894a5aa4b98f3d3 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 23 Jun 2014 21:25:12 +0200 Subject: [PATCH] Staging: bcm: Replaced member accessing with variable in device_run() Signed-off-by: Matthias Beyer Signed-off-by: Greg Kroah-Hartman --- drivers/staging/bcm/InterfaceInit.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm/InterfaceInit.c index dd7b4a59d366..e1a3e6d55555 100644 --- a/drivers/staging/bcm/InterfaceInit.c +++ b/drivers/staging/bcm/InterfaceInit.c @@ -340,16 +340,16 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter) { int value = 0; UINT status = STATUS_SUCCESS; + struct bcm_mini_adapter *psAd = psIntfAdapter->psAdapter; - status = InitCardAndDownloadFirmware(psIntfAdapter->psAdapter); + status = InitCardAndDownloadFirmware(psAd); if (status != STATUS_SUCCESS) { pr_err(DRV_NAME "InitCardAndDownloadFirmware failed.\n"); return status; } - if (psIntfAdapter->psAdapter->fw_download_done) { + if (psAd->fw_download_done) { if (StartInterruptUrb(psIntfAdapter)) { - BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, - DBG_TYPE_INITEXIT, DRV_ENTRY, + BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Cannot send interrupt in URB\n"); } @@ -358,17 +358,15 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter) * now register the cntrl interface. after downloading the f/w * waiting for 5 sec to get the mailbox interrupt. */ - psIntfAdapter->psAdapter->waiting_to_fw_download_done = false; - value = wait_event_timeout( - psIntfAdapter->psAdapter->ioctl_fw_dnld_wait_queue, - psIntfAdapter->psAdapter->waiting_to_fw_download_done, - 5 * HZ); + psAd->waiting_to_fw_download_done = false; + value = wait_event_timeout(psAd->ioctl_fw_dnld_wait_queue, + psAd->waiting_to_fw_download_done, + 5 * HZ); if (value == 0) pr_err(DRV_NAME ": Timeout waiting for mailbox interrupt.\n"); - if (register_control_device_interface( - psIntfAdapter->psAdapter) < 0) { + if (register_control_device_interface(psAd) < 0) { pr_err(DRV_NAME ": Register Control Device failed.\n"); return -EIO; } -- 2.30.2