1 // SPDX-License-Identifier: GPL-2.0
3 #include <linux/module.h>
7 static int fdomain_pci_probe(struct pci_dev
*pdev
,
8 const struct pci_device_id
*d
)
13 err
= pci_enable_device(pdev
);
17 err
= pci_request_regions(pdev
, "fdomain_pci");
22 if (pci_resource_len(pdev
, 0) == 0)
25 sh
= fdomain_create(pci_resource_start(pdev
, 0), pdev
->irq
, 7,
30 pci_set_drvdata(pdev
, sh
);
34 pci_release_regions(pdev
);
36 pci_disable_device(pdev
);
41 static void fdomain_pci_remove(struct pci_dev
*pdev
)
43 struct Scsi_Host
*sh
= pci_get_drvdata(pdev
);
46 pci_release_regions(pdev
);
47 pci_disable_device(pdev
);
50 static struct pci_device_id fdomain_pci_table
[] = {
51 { PCI_DEVICE(PCI_VENDOR_ID_FD
, PCI_DEVICE_ID_FD_36C70
) },
54 MODULE_DEVICE_TABLE(pci
, fdomain_pci_table
);
56 static struct pci_driver fdomain_pci_driver
= {
57 .name
= "fdomain_pci",
58 .id_table
= fdomain_pci_table
,
59 .probe
= fdomain_pci_probe
,
60 .remove
= fdomain_pci_remove
,
61 .driver
.pm
= FDOMAIN_PM_OPS
,
64 module_pci_driver(fdomain_pci_driver
);
66 MODULE_AUTHOR("Ondrej Zary, Rickard E. Faith");
67 MODULE_DESCRIPTION("Future Domain TMC-3260 PCI SCSI driver");
68 MODULE_LICENSE("GPL");