summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-04-05 17:19:09 +1000
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 19:02:37 -0700
commitbab41e9be75121c473b00df2ffa33af3c44066a7 (patch)
treecd519c2a32c951914ec7e7f909ae3822313f594c /drivers/pci
parent65891215e6b822c368fb3f36abf129ed48af8be0 (diff)
downloadop-kernel-dev-bab41e9be75121c473b00df2ffa33af3c44066a7.zip
op-kernel-dev-bab41e9be75121c473b00df2ffa33af3c44066a7.tar.gz
PCI: Convert to alloc_pci_dev()
Convert code that allocs a struct pci_dev to use alloc_pci_dev(). Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/fakephp.c2
-rw-r--r--drivers/pci/probe.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c
index e27907c..027f686 100644
--- a/drivers/pci/hotplug/fakephp.c
+++ b/drivers/pci/hotplug/fakephp.c
@@ -238,7 +238,7 @@ static void pci_rescan_bus(const struct pci_bus *bus)
{
unsigned int devfn;
struct pci_dev *dev;
- dev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL);
+ dev = alloc_pci_dev();
if (!dev)
return;
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 70d37bb..c659f8a 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -900,7 +900,7 @@ pci_scan_device(struct pci_bus *bus, int devfn)
if (pci_bus_read_config_byte(bus, devfn, PCI_HEADER_TYPE, &hdr_type))
return NULL;
- dev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL);
+ dev = alloc_pci_dev();
if (!dev)
return NULL;
OpenPOWER on IntegriCloud