From: Geliang Tang Date: Wed, 6 Jan 2016 15:35:16 +0000 (+0800) Subject: alpha: use kobj_to_dev() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8c9b839c0b80f4fb4c17632961770f2f4719f8e2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git alpha: use kobj_to_dev() Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Matt Turner --- 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;