[Lkw] [PATCH] Ready #4

Esteban Molina emolina at mi.unc.edu.ar
Fri Sep 15 15:19:52 EDT 2023


---
 drivers/block/nvme-cmb.c | 58 ----------------------------------------
 1 file changed, 58 deletions(-)
 delete mode 100644 drivers/block/nvme-cmb.c

diff --git a/drivers/block/nvme-cmb.c b/drivers/block/nvme-cmb.c
deleted file mode 100644
index 38e504bec..000000000
--- a/drivers/block/nvme-cmb.c
+++ /dev/null
@@ -1,58 +0,0 @@
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/pci.h>
-
-MODULE_LICENSE("GPL");
-
-static int nvme_cmb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
-{
-  int error;
-	dev_info(&pdev->dev, "found NVMe device\n");
-  pci_set_master(pdev);
-	error = pci_enable_device_mem(pdev);
-	if (error)
-		return error;
-	error = pci_request_mem_regions(pdev, "nvme-cmb");
-	if (error)
-	goto out_disable_device;
-	return 0;
-out_disable_device:
-pci_disable_device(pdev);
-return error;
-}
-
-static void nvme_cmb_remove(struct pci_dev *pdev)
-{
-	dev_info(&pdev->dev, "unbinding NVMe device\n");
-  pci_release_mem_regions(pdev);
-  pci_disable_device(pdev);
-
-}
-
-static const struct pci_device_id nvme_cmb_id_table[] = {
-	{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
-	{ 0, }
-};
-
-static struct pci_driver nvme_cmb_driver = {
-	.name = "nvme_cmb",
-	.id_table = nvme_cmb_id_table,
-	.probe = nvme_cmb_probe,
-	.remove = nvme_cmb_remove,
-};
-
-static int __init nvme_cmb_init(void)
-{
-	pr_info("loading nvme-cmb module\n");
-	return pci_register_driver(&nvme_cmb_driver);
-}
-
-static void __exit nvme_cmb_exit(void)
-{
-	pr_info("unloading nvme-cmb module\n");
-	pci_unregister_driver(&nvme_cmb_driver);
-}
-
-module_init(nvme_cmb_init);
-module_exit(nvme_cmb_exit);
-- 
2.39.2




More information about the LKW mailing list