[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210803100150.1543597-5-u.kleine-koenig@pengutronix.de>
Date: Tue, 3 Aug 2021 12:01:48 +0200
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: kernel@...gutronix.de,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-pci@...r.kernel.org, Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Russell Currey <ruscur@...sell.cc>,
"Oliver O'Halloran" <oohall@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Rafał Miłecki <zajec5@...il.com>,
Zhou Wang <wangzhou1@...ilicon.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Giovanni Cabiddu <giovanni.cabiddu@...el.com>,
Sathya Prakash <sathya.prakash@...adcom.com>,
Sreekanth Reddy <sreekanth.reddy@...adcom.com>,
Suganath Prabu Subramani
<suganath-prabu.subramani@...adcom.com>,
Frederic Barrat <fbarrat@...ux.ibm.com>,
Andrew Donnellan <ajd@...ux.ibm.com>,
Arnd Bergmann <arnd@...db.de>,
Yisen Zhuang <yisen.zhuang@...wei.com>,
Salil Mehta <salil.mehta@...wei.com>,
Jakub Kicinski <kuba@...nel.org>,
Vadym Kochan <vkochan@...vell.com>,
Taras Chornyi <tchornyi@...vell.com>,
Jiri Pirko <jiri@...dia.com>, Ido Schimmel <idosch@...dia.com>,
Simon Horman <simon.horman@...igine.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Michael Buesch <m@...s.ch>,
Mathias Nyman <mathias.nyman@...el.com>,
Fiona Trahe <fiona.trahe@...el.com>,
Andy Shevchenko <andriy.shevchenko@...el.com>,
Wojciech Ziemba <wojciech.ziemba@...el.com>,
Alexander Duyck <alexanderduyck@...com>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org, linux-wireless@...r.kernel.org,
linux-crypto@...r.kernel.org, qat-linux@...el.com,
MPT-FusionLinux.pdl@...adcom.com, linux-scsi@...r.kernel.org,
netdev@...r.kernel.org, oss-drivers@...igine.com,
xen-devel@...ts.xenproject.org, linux-usb@...r.kernel.org
Subject: [PATCH v2 4/6] PCI: Provide wrapper to access a pci_dev's bound driver
Which driver a device is bound to is available twice: In struct
pci_dev::dev->driver and in struct pci_dev::driver. To get rid of the
duplication introduce a wrapper to access struct pci_dev's driver
member. Once all users are converted the wrapper can be changed to
calculate the driver using pci_dev::dev->driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
---
include/linux/pci.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 540b377ca8f6..778f3b5e6f23 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -887,6 +887,7 @@ struct pci_driver {
};
#define to_pci_driver(drv) container_of(drv, struct pci_driver, driver)
+#define pci_driver_of_dev(pdev) ((pdev)->driver)
/**
* PCI_DEVICE - macro used to describe a specific PCI device
--
2.30.2
Powered by blists - more mailing lists