Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105707
b: refs/heads/master
c: a6c43a2
h: refs/heads/master
i:
  105705: 0a8cd79
  105703: c9c9957
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 24, 2008
1 parent 9264d42 commit 032ee7b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 741ac62f6fca55ddbef52513fbc687ba6b04f99e
refs/heads/master: a6c43a2be9721d00ef9d6ef5b7b0e8113444577b
18 changes: 18 additions & 0 deletions trunk/drivers/ide/pci/hpt366.c
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,17 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic
return ret;
}

static void __devexit hpt366_remove(struct pci_dev *dev)
{
struct ide_host *host = pci_get_drvdata(dev);
struct ide_info *info = host->host_priv;
struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL;

ide_pci_remove(dev);
pci_dev_put(dev2);
kfree(info);
}

static const struct pci_device_id hpt366_pci_tbl[] __devinitconst = {
{ PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), 0 },
{ PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT372), 1 },
Expand All @@ -1642,14 +1653,21 @@ static struct pci_driver driver = {
.name = "HPT366_IDE",
.id_table = hpt366_pci_tbl,
.probe = hpt366_init_one,
.remove = hpt366_remove,
};

static int __init hpt366_ide_init(void)
{
return ide_pci_register_driver(&driver);
}

static void __exit hpt366_ide_exit(void)
{
pci_unregister_driver(&driver);
}

module_init(hpt366_ide_init);
module_exit(hpt366_ide_exit);

MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for Highpoint HPT366 IDE");
Expand Down

0 comments on commit 032ee7b

Please sign in to comment.