Skip to content

Commit

Permalink
Merge branch 'pci_set_drvdata'
Browse files Browse the repository at this point in the history
Jingoo Han syas:

====================
ethernet: remove unnecessary pci_set_drvdata() part 4

Since commit 0998d06
(device-core: Ensure drvdata = NULL when no driver is bound),
the driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Oct 23, 2013
2 parents 305a338 + a3b8a16 commit df33db0
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 9 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ethernet/sun/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -9875,7 +9875,6 @@ static int niu_pci_init_one(struct pci_dev *pdev,

err_out_disable_pdev:
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);

return err;
}
Expand All @@ -9900,7 +9899,6 @@ static void niu_pci_remove_one(struct pci_dev *pdev)
free_netdev(dev);
pci_release_regions(pdev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
}
}

Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/sun/sungem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2806,8 +2806,6 @@ static void gem_remove_one(struct pci_dev *pdev)
iounmap(gp->regs);
pci_release_regions(pdev);
free_netdev(dev);

pci_set_drvdata(pdev, NULL);
}
}

Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/tehuti/tehuti.c
Original file line number Diff line number Diff line change
Expand Up @@ -2447,7 +2447,6 @@ static void bdx_remove(struct pci_dev *pdev)
iounmap(nic->regs);
pci_release_regions(pdev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
vfree(nic);

RET();
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/ti/tlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ static void tlan_remove_one(struct pci_dev *pdev)

free_netdev(dev);

pci_set_drvdata(pdev, NULL);
cancel_work_sync(&priv->tlan_tqueue);
}

Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/toshiba/spider_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -2478,7 +2478,6 @@ spider_net_setup_pci_dev(struct pci_dev *pdev)
pci_release_regions(pdev);
out_disable_dev:
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
return NULL;
}

Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/toshiba/tc35815.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,6 @@ static void tc35815_remove_one(struct pci_dev *pdev)
mdiobus_free(lp->mii_bus);
unregister_netdev(dev);
free_netdev(dev);
pci_set_drvdata(pdev, NULL);
}

static int
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/via/via-rhine.c
Original file line number Diff line number Diff line change
Expand Up @@ -2292,7 +2292,6 @@ static void rhine_remove_one(struct pci_dev *pdev)

free_netdev(dev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
}

static void rhine_shutdown (struct pci_dev *pdev)
Expand Down

0 comments on commit df33db0

Please sign in to comment.