mirror of
https://github.com/fpganinja/taxi.git
synced 2026-01-18 01:30:36 -08:00
cndm: Replace DRIVER_NAME with KBUILD_MODNAME
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
@@ -19,7 +19,6 @@ Authors:
|
||||
#include <linux/ptp_clock_kernel.h>
|
||||
#include <net/devlink.h>
|
||||
|
||||
#define DRIVER_NAME "cndm"
|
||||
#define DRIVER_VERSION "0.1"
|
||||
|
||||
#define CNDM_MAX_IRQ 256
|
||||
|
||||
@@ -18,7 +18,7 @@ static void cndm_get_drvinfo(struct net_device *ndev,
|
||||
struct cndm_priv *priv = netdev_priv(ndev);
|
||||
struct cndm_dev *cdev = priv->cdev;
|
||||
|
||||
strscpy(drvinfo->driver, DRIVER_NAME, sizeof(drvinfo->driver));
|
||||
strscpy(drvinfo->driver, KBUILD_MODNAME, sizeof(drvinfo->driver));
|
||||
strscpy(drvinfo->version, DRIVER_VERSION, sizeof(drvinfo->version));
|
||||
snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), "TODO"); // TODO
|
||||
strscpy(drvinfo->bus_info, dev_name(cdev->dev), sizeof(drvinfo->bus_info));
|
||||
|
||||
@@ -27,7 +27,7 @@ static int cndm_assign_id(struct cndm_dev *cdev)
|
||||
return ret;
|
||||
|
||||
cdev->id = ret;
|
||||
snprintf(cdev->name, sizeof(cdev->name), DRIVER_NAME "%d", cdev->id);
|
||||
snprintf(cdev->name, sizeof(cdev->name), KBUILD_MODNAME "%d", cdev->id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -121,7 +121,7 @@ static int cndm_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
struct pci_dev *bridge = pci_upstream_bridge(pdev);
|
||||
int ret = 0;
|
||||
|
||||
dev_info(dev, DRIVER_NAME " PCI probe");
|
||||
dev_info(dev, KBUILD_MODNAME " PCI probe");
|
||||
dev_info(dev, "Corundum device driver");
|
||||
dev_info(dev, "Version " DRIVER_VERSION);
|
||||
dev_info(dev, "Copyright (c) 2025 FPGA Ninja, LLC");
|
||||
@@ -264,7 +264,7 @@ static void cndm_pci_remove(struct pci_dev *pdev)
|
||||
struct cndm_dev *cdev = pci_get_drvdata(pdev);
|
||||
struct devlink *devlink = priv_to_devlink(cdev);
|
||||
|
||||
dev_info(dev, DRIVER_NAME " PCI remove");
|
||||
dev_info(dev, KBUILD_MODNAME " PCI remove");
|
||||
|
||||
cndm_common_remove(cdev);
|
||||
|
||||
@@ -284,7 +284,7 @@ static const struct pci_device_id cndm_pci_id_table[] = {
|
||||
};
|
||||
|
||||
static struct pci_driver cndm_driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.name = KBUILD_MODNAME,
|
||||
.id_table = cndm_pci_id_table,
|
||||
.probe = cndm_pci_probe,
|
||||
.remove = cndm_pci_remove
|
||||
|
||||
Reference in New Issue
Block a user