summaryrefslogtreecommitdiff
path: root/drivers/bcma
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-10-04 15:59:28 +0300
committerBjorn Helgaas <bhelgaas@google.com>2021-10-13 01:50:12 +0300
commit823c523eb2e4f2fe37f898861c28b3d8ef22f5ff (patch)
tree68beb7649f979b0b295fb7ac5f4385b420e08054 /drivers/bcma
parent8f5c335e34b5ae2dda6db2af300381fc9fb53fe7 (diff)
downloadlinux-823c523eb2e4f2fe37f898861c28b3d8ef22f5ff.tar.xz
bcma: simplify reference to driver name
When bcma_host_pci_probe() is called, the PCI driver core has already assigned the device's driver in local_pci_probe(). So dev->driver is always true, and here it points to bcma_pci_bridge_driver, which has .name set to "bcma-pci-bridge". Simplify accordingly. Link: https://lore.kernel.org/r/20211004125935.2300113-5-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>
Diffstat (limited to 'drivers/bcma')
-rw-r--r--drivers/bcma/host_pci.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
index 69c10a7b7c61..960632197b05 100644
--- a/drivers/bcma/host_pci.c
+++ b/drivers/bcma/host_pci.c
@@ -162,7 +162,6 @@ static int bcma_host_pci_probe(struct pci_dev *dev,
{
struct bcma_bus *bus;
int err = -ENOMEM;
- const char *name;
u32 val;
/* Alloc */
@@ -175,10 +174,7 @@ static int bcma_host_pci_probe(struct pci_dev *dev,
if (err)
goto err_kfree_bus;
- 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, "bcma-pci-bridge");
if (err)
goto err_pci_disable;
pci_set_master(dev);