summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorGeliang Tang2016-01-08 19:05:39 +0100
committerBjorn Helgaas2016-01-08 19:05:39 +0100
commitf3d2f1655b543e2e8aaeaac0e1f6250c09fe1692 (patch)
tree473fb316779ab5dca43a40ce806b13bd27dad02b /drivers/pci/hotplug
parentPCI: Fix all whitespace issues (diff)
downloadkernel-qcow2-linux-f3d2f1655b543e2e8aaeaac0e1f6250c09fe1692.tar.gz
kernel-qcow2-linux-f3d2f1655b543e2e8aaeaac0e1f6250c09fe1692.tar.xz
kernel-qcow2-linux-f3d2f1655b543e2e8aaeaac0e1f6250c09fe1692.zip
PCI: Use to_pci_dev() instead of open-coding it
Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/shpchp_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/shpchp_sysfs.c b/drivers/pci/hotplug/shpchp_sysfs.c
index 1b4d73d8c728..7efb56a28c9f 100644
--- a/drivers/pci/hotplug/shpchp_sysfs.c
+++ b/drivers/pci/hotplug/shpchp_sysfs.c
@@ -43,7 +43,7 @@ static ssize_t show_ctrl(struct device *dev, struct device_attribute *attr, char
struct resource *res;
struct pci_bus *bus;
- pdev = container_of(dev, struct pci_dev, dev);
+ pdev = to_pci_dev(dev);
bus = pdev->subordinate;
out += sprintf(buf, "Free resources: memory\n");