summaryrefslogtreecommitdiff
path: root/drivers/pci/pci-label.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2015-12-23 15:28:13 +0300
committerBjorn Helgaas <bhelgaas@google.com>2016-01-08 21:07:57 +0300
commit554a60379aaa502def3c77ae1af69247588c020a (patch)
treeec3b92b3618e568b97218531f43e95256ba7e8e3 /drivers/pci/pci-label.c
parentf3d2f1655b543e2e8aaeaac0e1f6250c09fe1692 (diff)
downloadlinux-554a60379aaa502def3c77ae1af69247588c020a.tar.xz
PCI: Use kobj_to_dev() instead of open-coding it
Use kobj_to_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/pci-label.c')
-rw-r--r--drivers/pci/pci-label.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c
index 024b5c179348..0ae74d96ed85 100644
--- a/drivers/pci/pci-label.c
+++ b/drivers/pci/pci-label.c
@@ -77,7 +77,7 @@ static umode_t smbios_instance_string_exist(struct kobject *kobj,
struct device *dev;
struct pci_dev *pdev;
- dev = container_of(kobj, struct device, kobj);
+ dev = kobj_to_dev(kobj);
pdev = to_pci_dev(dev);
return find_smbios_instance_string(pdev, NULL, SMBIOS_ATTR_NONE) ?
@@ -221,7 +221,7 @@ static umode_t acpi_index_string_exist(struct kobject *kobj,
{
struct device *dev;
- dev = container_of(kobj, struct device, kobj);
+ dev = kobj_to_dev(kobj);
if (device_has_dsm(dev))
return S_IRUGO;