aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2013-04-07 23:05:07 -0400
committerMichael Ellerman <michael@ellerman.id.au>2013-04-18 01:59:57 -0400
commit88e7b167a079f090405ab4390b629b5effdab41a (patch)
tree1d77e15a878d12838a97d021720cc6bfb923914a
parent37f02195bee9c25ce44e25204f40b7961a6d7c9d (diff)
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: Brian King <brking@linux.vnet.ibm.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
-rw-r--r--drivers/pci/probe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index b494066ef32f..92be60cf5214 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -988,7 +988,6 @@ int pci_setup_device(struct pci_dev *dev)
988 dev->sysdata = dev->bus->sysdata; 988 dev->sysdata = dev->bus->sysdata;
989 dev->dev.parent = dev->bus->bridge; 989 dev->dev.parent = dev->bus->bridge;
990 dev->dev.bus = &pci_bus_type; 990 dev->dev.bus = &pci_bus_type;
991 dev->dev.type = &pci_dev_type;
992 dev->hdr_type = hdr_type & 0x7f; 991 dev->hdr_type = hdr_type & 0x7f;
993 dev->multifunction = !!(hdr_type & 0x80); 992 dev->multifunction = !!(hdr_type & 0x80);
994 dev->error_state = pci_channel_io_normal; 993 dev->error_state = pci_channel_io_normal;
@@ -1208,6 +1207,7 @@ struct pci_dev *alloc_pci_dev(void)
1208 return NULL; 1207 return NULL;
1209 1208
1210 INIT_LIST_HEAD(&dev->bus_list); 1209 INIT_LIST_HEAD(&dev->bus_list);
1210 dev->dev.type = &pci_dev_type;
1211 1211
1212 return dev; 1212 return dev;
1213} 1213}