cndm_proto: Replace DRIVER_NAME with KBUILD_MODNAME

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich
2026-01-01 21:45:11 -08:00
parent b8cd443e01
commit 847d47b71f
2 changed files with 6 additions and 7 deletions

View File

@@ -16,7 +16,6 @@ Authors:
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#define DRIVER_NAME "cndm_proto"
#define DRIVER_VERSION "0.1" #define DRIVER_VERSION "0.1"
struct cndm_proto_dev { struct cndm_proto_dev {

View File

@@ -24,10 +24,10 @@ static int cndm_proto_pci_probe(struct pci_dev *pdev, const struct pci_device_id
int ret = 0; int ret = 0;
int k; int k;
dev_info(dev, DRIVER_NAME " PCI probe"); dev_info(dev, KBUILD_MODNAME " PCI probe");
dev_info(dev, "Corundum-proto device driver"); dev_info(dev, "Corundum-proto device driver");
dev_info(dev, "Version " DRIVER_VERSION); dev_info(dev, "Version " DRIVER_VERSION);
dev_info(dev, "Copyright (c) 2025 FPGA Ninja"); dev_info(dev, "Copyright (c) 2025 FPGA Ninja, LLC");
dev_info(dev, "https://fpga.ninja/"); dev_info(dev, "https://fpga.ninja/");
pcie_print_link_status(pdev); pcie_print_link_status(pdev);
@@ -48,7 +48,7 @@ static int cndm_proto_pci_probe(struct pci_dev *pdev, const struct pci_device_id
pci_set_master(pdev); pci_set_master(pdev);
ret = pci_request_regions(pdev, DRIVER_NAME); ret = pci_request_regions(pdev, KBUILD_MODNAME);
if (ret) { if (ret) {
dev_err(dev, "Failed to reserve regions"); dev_err(dev, "Failed to reserve regions");
goto fail_regions; goto fail_regions;
@@ -93,7 +93,7 @@ static int cndm_proto_pci_probe(struct pci_dev *pdev, const struct pci_device_id
goto fail_netdev; goto fail_netdev;
} }
ret = pci_request_irq(pdev, k, cndm_proto_irq, 0, ndev, DRIVER_NAME); ret = pci_request_irq(pdev, k, cndm_proto_irq, 0, ndev, KBUILD_MODNAME);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "Failed to request IRQ"); dev_err(dev, "Failed to request IRQ");
cndm_proto_destroy_netdev(ndev); cndm_proto_destroy_netdev(ndev);
@@ -131,7 +131,7 @@ static void cndm_proto_pci_remove(struct pci_dev *pdev)
struct cndm_proto_dev *cdev = pci_get_drvdata(pdev); struct cndm_proto_dev *cdev = pci_get_drvdata(pdev);
int k; int k;
dev_info(dev, DRIVER_NAME " PCI remove"); dev_info(dev, KBUILD_MODNAME " PCI remove");
for (k = 0; k < 32; k++) { for (k = 0; k < 32; k++) {
if (cdev->ndev[k]) { if (cdev->ndev[k]) {
@@ -155,7 +155,7 @@ static const struct pci_device_id cndm_proto_pci_id_table[] = {
}; };
static struct pci_driver cndm_proto_driver = { static struct pci_driver cndm_proto_driver = {
.name = DRIVER_NAME, .name = KBUILD_MODNAME,
.id_table = cndm_proto_pci_id_table, .id_table = cndm_proto_pci_id_table,
.probe = cndm_proto_pci_probe, .probe = cndm_proto_pci_probe,
.remove = cndm_proto_pci_remove .remove = cndm_proto_pci_remove