From: "Michael Büsch" <m@bues.ch>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
Christoph Hellwig <hch@lst.de>,
linux-pci@vger.kernel.org, kernel@pengutronix.de,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH v5 06/11] ssb: Simplify determination of driver name
Date: Wed, 29 Sep 2021 13:13:48 +0200 [thread overview]
Message-ID: <20210929131348.4259f79d@wiggum> (raw)
In-Reply-To: <20210929085306.2203850-7-u.kleine-koenig@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]
On Wed, 29 Sep 2021 10:53:01 +0200
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> For all drivers that make use of ssb_pcihost_probe() (i.e.
> b43_pci_bridge_driver and b44_pci_driver) the driver name is set.
> As at the time for the function is called __pci_register_driver() already
> assigned drv->driver.name to hold the same value, use
> dev_driver_string() with the same result.
>
> This has the upside of not requiring the driver member of struct pci_dev
> which is about to be removed and being simpler.
> 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);
Makes sense.
Acked-by: Michael Büsch <m@bues.ch>
--
Michael
https://bues.ch/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-09-29 11:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 8:52 [PATCH v5 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver Uwe Kleine-König
2021-09-29 8:52 ` [PATCH v5 01/11] PCI: Simplify pci_device_remove() Uwe Kleine-König
2021-09-29 8:52 ` [PATCH v5 02/11] PCI: Drop useless check from pci_device_probe() Uwe Kleine-König
2021-09-29 8:52 ` [PATCH v5 03/11] xen/pci: Drop some checks that are always true Uwe Kleine-König
2021-09-29 8:52 ` [PATCH v5 04/11] bcma: simplify reference to the driver's name Uwe Kleine-König
2021-09-29 8:53 ` [PATCH v5 05/11] powerpc/eeh: Don't use driver member of struct pci_dev and further cleanups Uwe Kleine-König
2021-09-29 8:53 ` [PATCH v5 06/11] ssb: Simplify determination of driver name Uwe Kleine-König
2021-09-29 11:13 ` Michael Büsch [this message]
2021-09-29 8:53 ` [PATCH v5 07/11] PCI: Replace pci_dev::driver usage that gets the " Uwe Kleine-König
2021-09-29 10:17 ` Simon Horman
2021-09-29 14:44 ` Ido Schimmel
2021-09-29 15:21 ` Ido Schimmel
2021-09-29 8:53 ` [PATCH v5 08/11] scsi: message: fusion: Remove unused parameter of mpt_pci driver's probe() Uwe Kleine-König
2021-09-29 8:53 ` [PATCH v5 09/11] crypto: qat - simplify adf_enable_aer() Uwe Kleine-König
2021-09-29 8:53 ` [PATCH v5 10/11] PCI: Replace pci_dev::driver usage by pci_dev::dev.driver Uwe Kleine-König
2021-09-29 13:15 ` Andrew Donnellan
2021-09-29 13:43 ` Uwe Kleine-König
2021-09-29 15:44 ` Andrew Donnellan
2021-09-30 13:48 ` Frederic Barrat
2021-09-29 8:53 ` [PATCH v5 11/11] PCI: Drop duplicated tracking of a pci_dev's bound driver Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210929131348.4259f79d@wiggum \
--to=m@bues.ch \
--cc=hch@lst.de \
--cc=helgaas@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-pci@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).