Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18786
b: refs/heads/master
c: 030d675
h: refs/heads/master
v: v3
  • Loading branch information
Arnd Bergmann authored and Jeff Garzik committed Jan 17, 2006
1 parent 88e88e7 commit d180e1b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 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: 0d3ea1666f1894a874681fe33e2cb7fee41a0c73
refs/heads/master: 030d6753f8b6251927330431a7e5f0ac86bc6da9
19 changes: 15 additions & 4 deletions trunk/drivers/net/spider_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1895,16 +1895,27 @@ spider_net_download_firmware(struct spider_net_card *card,
static int
spider_net_init_firmware(struct spider_net_card *card)
{
const struct firmware *firmware;
struct firmware *firmware;
struct device_node *dn;
u8 *fw_prop;
int err = -EIO;

if (request_firmware(&firmware,
if (request_firmware((const struct firmware **)&firmware,
SPIDER_NET_FIRMWARE_NAME, &card->pdev->dev) < 0) {
if (netif_msg_probe(card))
pr_err("Couldn't read in sequencer data file %s.\n",
SPIDER_NET_FIRMWARE_NAME);
firmware = NULL;
goto out;

dn = pci_device_to_OF_node(card->pdev);
if (!dn)
goto out;

fw_prop = (u8 *)get_property(dn, "firmware", NULL);
if (!fw_prop)
goto out;

memcpy(firmware->data, fw_prop, 6 * SPIDER_NET_FIRMWARE_LEN * sizeof(u32));
firmware->size = 6 * SPIDER_NET_FIRMWARE_LEN * sizeof(u32);
}

if (firmware->size != 6 * SPIDER_NET_FIRMWARE_LEN * sizeof(u32)) {
Expand Down

0 comments on commit d180e1b

Please sign in to comment.