diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-10-04 14:59:30 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2021-10-12 17:50:12 -0500 |
commit | 7c3b2c933a916e32e9c8b56074a47c1b3f3e7cbe (patch) | |
tree | aad46660512aad099995962315171f7bad5c859a /drivers/ssb | |
parent | 823c523eb2e4f2fe37f898861c28b3d8ef22f5ff (diff) |
ssb: Use dev_driver_string() instead of pci_dev->driver->name
All drivers that use ssb_pcihost_probe(), i.e., b43_pci_bridge_driver and
b44_pci_driver, set the pci_driver.name, and __pci_register_driver() sets
the struct driver.name member to the same value.
Replace dev->driver_name() by dev_driver_string() for the corresponding
struct device. This is a step toward removing pci_dev->driver.
Link: https://lore.kernel.org/r/20211004125935.2300113-7-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: Michael Büsch <m@bues.ch>
Diffstat (limited to 'drivers/ssb')
-rw-r--r-- | drivers/ssb/pcihost_wrapper.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/ssb/pcihost_wrapper.c b/drivers/ssb/pcihost_wrapper.c index 410215c16920..dd70fd41c77d 100644 --- a/drivers/ssb/pcihost_wrapper.c +++ b/drivers/ssb/pcihost_wrapper.c @@ -69,7 +69,6 @@ static int ssb_pcihost_probe(struct pci_dev *dev, { struct ssb_bus *ssb; int err = -ENOMEM; - const char *name; u32 val; ssb = kzalloc(sizeof(*ssb), GFP_KERNEL); @@ -78,10 +77,7 @@ static int ssb_pcihost_probe(struct pci_dev *dev, err = pci_enable_device(dev); if (err) goto err_kfree_ssb; - name = dev_name(&dev->dev); - if (dev->driver && dev->driver->name) - name = dev->driver->name; - err = pci_request_regions(dev, name); + err = pci_request_regions(dev, dev_driver_string(&dev->dev)); if (err) goto err_pci_disable; pci_set_master(dev); |