diff options
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index ef1165718dd7..2ab5c39f33ca 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -4487,13 +4487,16 @@ static int __devinit sky2_probe(struct pci_dev *pdev, | |||
4487 | wol_default = device_may_wakeup(&pdev->dev) ? WAKE_MAGIC : 0; | 4487 | wol_default = device_may_wakeup(&pdev->dev) ? WAKE_MAGIC : 0; |
4488 | 4488 | ||
4489 | err = -ENOMEM; | 4489 | err = -ENOMEM; |
4490 | hw = kzalloc(sizeof(*hw), GFP_KERNEL); | 4490 | |
4491 | hw = kzalloc(sizeof(*hw) + strlen(DRV_NAME "@pci:") | ||
4492 | + strlen(pci_name(pdev)) + 1, GFP_KERNEL); | ||
4491 | if (!hw) { | 4493 | if (!hw) { |
4492 | dev_err(&pdev->dev, "cannot allocate hardware struct\n"); | 4494 | dev_err(&pdev->dev, "cannot allocate hardware struct\n"); |
4493 | goto err_out_free_regions; | 4495 | goto err_out_free_regions; |
4494 | } | 4496 | } |
4495 | 4497 | ||
4496 | hw->pdev = pdev; | 4498 | hw->pdev = pdev; |
4499 | sprintf(hw->irq_name, DRV_NAME "@pci:%s", pci_name(pdev)); | ||
4497 | 4500 | ||
4498 | hw->regs = ioremap_nocache(pci_resource_start(pdev, 0), 0x4000); | 4501 | hw->regs = ioremap_nocache(pci_resource_start(pdev, 0), 0x4000); |
4499 | if (!hw->regs) { | 4502 | if (!hw->regs) { |
@@ -4539,7 +4542,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev, | |||
4539 | 4542 | ||
4540 | err = request_irq(pdev->irq, sky2_intr, | 4543 | err = request_irq(pdev->irq, sky2_intr, |
4541 | (hw->flags & SKY2_HW_USE_MSI) ? 0 : IRQF_SHARED, | 4544 | (hw->flags & SKY2_HW_USE_MSI) ? 0 : IRQF_SHARED, |
4542 | dev->name, hw); | 4545 | hw->irq_name, hw); |
4543 | if (err) { | 4546 | if (err) { |
4544 | dev_err(&pdev->dev, "cannot assign irq %d\n", pdev->irq); | 4547 | dev_err(&pdev->dev, "cannot assign irq %d\n", pdev->irq); |
4545 | goto err_out_unregister; | 4548 | goto err_out_unregister; |