Commit 20af74ef140f0fbc477f90817c58241107782e10
Committed by
Greg Kroah-Hartman
1 parent
445f82492f
Exists in
smarc_imx_lf-5.15.y
and in
27 other branches
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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
lib/devres.c
... | ... | @@ -236,7 +236,7 @@ |
236 | 236 | |
237 | 237 | static void pcim_iomap_release(struct device *gendev, void *res) |
238 | 238 | { |
239 | - struct pci_dev *dev = container_of(gendev, struct pci_dev, dev); | |
239 | + struct pci_dev *dev = to_pci_dev(gendev); | |
240 | 240 | struct pcim_iomap_devres *this = res; |
241 | 241 | int i; |
242 | 242 |