diff options
author | Geliang Tang <geliangtang@163.com> | 2016-01-06 16:35:16 +0100 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2017-09-04 21:04:33 +0200 |
commit | 8c9b839c0b80f4fb4c17632961770f2f4719f8e2 (patch) | |
tree | 912e39bc6b46394eb1e0b5733d42b22adb59d176 /arch/alpha/kernel/pci-sysfs.c | |
parent | alpha: squash lines for immediate return (diff) | |
download | linux-8c9b839c0b80f4fb4c17632961770f2f4719f8e2.tar.xz linux-8c9b839c0b80f4fb4c17632961770f2f4719f8e2.zip |
alpha: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'arch/alpha/kernel/pci-sysfs.c')
-rw-r--r-- | arch/alpha/kernel/pci-sysfs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/alpha/kernel/pci-sysfs.c b/arch/alpha/kernel/pci-sysfs.c index 652449ebed52..cbecd527c696 100644 --- a/arch/alpha/kernel/pci-sysfs.c +++ b/arch/alpha/kernel/pci-sysfs.c @@ -64,8 +64,7 @@ static int pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, struct vm_area_struct *vma, int sparse) { - struct pci_dev *pdev = to_pci_dev(container_of(kobj, - struct device, kobj)); + struct pci_dev *pdev = to_pci_dev(kobj_to_dev(kobj)); struct resource *res = attr->private; enum pci_mmap_state mmap_type; struct pci_bus_region bar; |