mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
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>
This commit is contained in:
parent
203308a5d1
commit
8c9b839c0b
1 changed files with 1 additions and 2 deletions
|
@ -64,8 +64,7 @@ static int pci_mmap_resource(struct kobject *kobj,
|
||||||
struct bin_attribute *attr,
|
struct bin_attribute *attr,
|
||||||
struct vm_area_struct *vma, int sparse)
|
struct vm_area_struct *vma, int sparse)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev = to_pci_dev(container_of(kobj,
|
struct pci_dev *pdev = to_pci_dev(kobj_to_dev(kobj));
|
||||||
struct device, kobj));
|
|
||||||
struct resource *res = attr->private;
|
struct resource *res = attr->private;
|
||||||
enum pci_mmap_state mmap_type;
|
enum pci_mmap_state mmap_type;
|
||||||
struct pci_bus_region bar;
|
struct pci_bus_region bar;
|
||||||
|
|
Loading…
Reference in a new issue