Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337110
b: refs/heads/master
c: f20fbdf
h: refs/heads/master
v: v3
  • Loading branch information
Malcolm Priestley authored and Greg Kroah-Hartman committed Oct 22, 2012
1 parent d988cad commit 1ddd971
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab1dd9963137a1e122004d5378a581bf16ae9bc8
refs/heads/master: f20fbdf829c11c3c29ee94c0c10ec6195ac4c362
1 change: 0 additions & 1 deletion trunk/drivers/staging/vt6656/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,6 @@ typedef struct __device_info {
struct net_device* dev;
struct net_device_stats stats;

const struct firmware *firmware;

OPTIONS sOpts;

Expand Down
22 changes: 10 additions & 12 deletions trunk/drivers/staging/vt6656/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,24 @@ FIRMWAREbDownload(
PSDevice pDevice
)
{
struct device *dev = &pDevice->usb->dev;
const struct firmware *fw;
int NdisStatus;
void *pBuffer = NULL;
BOOL result = FALSE;
u16 wLength;
int ii;
int ii, rc;


DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Download firmware\n");
spin_unlock_irq(&pDevice->lock);

if (!pDevice->firmware) {
struct device *dev = &pDevice->usb->dev;
int rc;

rc = request_firmware(&pDevice->firmware, FIRMWARE_NAME, dev);
if (rc) {
dev_err(dev, "firmware file %s request failed (%d)\n",
FIRMWARE_NAME, rc);
rc = request_firmware(&fw, FIRMWARE_NAME, dev);
if (rc) {
dev_err(dev, "firmware file %s request failed (%d)\n",
FIRMWARE_NAME, rc);
goto out;
}
}
fw = pDevice->firmware;

pBuffer = kmalloc(FIRMWARE_CHUNK_SIZE, GFP_KERNEL);
if (!pBuffer)
Expand All @@ -103,10 +99,12 @@ FIRMWAREbDownload(
DBG_PRT(MSG_LEVEL_DEBUG,
KERN_INFO"Download firmware...%d %zu\n", ii, fw->size);
if (NdisStatus != STATUS_SUCCESS)
goto out;
goto free_fw;
}

result = TRUE;
free_fw:
release_firmware(fw);

out:
kfree(pBuffer);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/vt6656/main_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,6 @@ static void __devexit vt6656_disconnect(struct usb_interface *intf)
}

device_release_WPADEV(device);
release_firmware(device->firmware);

usb_set_intfdata(intf, NULL);
usb_put_dev(interface_to_usbdev(intf));
Expand Down

0 comments on commit 1ddd971

Please sign in to comment.