summaryrefslogtreecommitdiffstats
path: root/lib/devres.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2015-12-27 11:46:05 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-08 08:17:59 +0100
commit20af74ef140f0fbc477f90817c58241107782e10 (patch)
treeefef8b08982891c814a72fce69e80d1dbc61dcd0 /lib/devres.c
parentvme: vme_ca91cx42.c: use to_pci_dev() (diff)
downloadlinux-20af74ef140f0fbc477f90817c58241107782e10.tar.xz
linux-20af74ef140f0fbc477f90817c58241107782e10.zip
devres: use to_pci_dev()
Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/devres.c')
-rw-r--r--lib/devres.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/devres.c b/lib/devres.c
index 8c85672639d3..cb1464c411a2 100644
--- a/lib/devres.c
+++ b/lib/devres.c
@@ -236,7 +236,7 @@ struct pcim_iomap_devres {
static void pcim_iomap_release(struct device *gendev, void *res)
{
- struct pci_dev *dev = container_of(gendev, struct pci_dev, dev);
+ struct pci_dev *dev = to_pci_dev(gendev);
struct pcim_iomap_devres *this = res;
int i;