nfp: use dev_driver_string() instead of pci_dev->driver->name
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 12 Oct 2021 22:55:03 +0000 (17:55 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 12 Oct 2021 23:20:15 +0000 (18:20 -0500)
Replace dev->driver_name() by dev_driver_string() for the corresponding
struct device.  This is a step toward removing pci_dev->driver.

[bhelgaas: split to separate patch]
Link: https://lore.kernel.org/r/20211004125935.2300113-8-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Simon Horman <simon.horman@corigine.com>
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c

index 0685ece..1de076f 100644 (file)
@@ -202,7 +202,8 @@ nfp_get_drvinfo(struct nfp_app *app, struct pci_dev *pdev,
 {
        char nsp_version[ETHTOOL_FWVERS_LEN] = {};
 
-       strlcpy(drvinfo->driver, pdev->driver->name, sizeof(drvinfo->driver));
+       strlcpy(drvinfo->driver, dev_driver_string(&pdev->dev),
+               sizeof(drvinfo->driver));
        nfp_net_get_nspinfo(app, nsp_version);
        snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version),
                 "%s %s %s %s", vnic_version, nsp_version,