Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88e7b167 authored by Brian King's avatar Brian King Committed by Michael Ellerman
Browse files

pci: Set dev->dev.type in alloc_pci_dev



Set dev->dev.type in alloc_pci_dev so that archs that have their own
versions of pci_setup_device get this set properly in order to ensure
things like the boot_vga sysfs parameter get created as expected.

Signed-off-by: default avatarBrian King <brking@linux.vnet.ibm.com>
Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
parent 37f02195
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -988,7 +988,6 @@ int pci_setup_device(struct pci_dev *dev)
	dev->sysdata = dev->bus->sysdata;
	dev->dev.parent = dev->bus->bridge;
	dev->dev.bus = &pci_bus_type;
	dev->dev.type = &pci_dev_type;
	dev->hdr_type = hdr_type & 0x7f;
	dev->multifunction = !!(hdr_type & 0x80);
	dev->error_state = pci_channel_io_normal;
@@ -1208,6 +1207,7 @@ struct pci_dev *alloc_pci_dev(void)
		return NULL;

	INIT_LIST_HEAD(&dev->bus_list);
	dev->dev.type = &pci_dev_type;

	return dev;
}