diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 18:49:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 18:49:57 -0500 |
commit | a3ea9b584ed2acdeae817f0dc91a5880e0828a05 (patch) | |
tree | 5b4ef9b10c05aa84419a6ba6187d0dcd14654c97 /drivers/pci/pci-driver.c | |
parent | 554f593d6c411e717a71ffdcb0cfb46bb2394502 (diff) | |
parent | b2e6e3ba7deb525f180df64f32f3fcb214538bea (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (49 commits)
[PATCH] acpiphp: fix acpi_path_name
[PATCH] ibmphp: remove TRUE and FALSE
[PATCH] PCI Hotplug: add common acpi functions to core
[PATCH] PCI: kzalloc() conversion in drivers/pci
[PATCH] acpiphp: Scan slots under the nested P2P bridge
[PATCH] PCI Hotplug: SN: Fix cleanup on hotplug removal of PPB
[PATCH] shpchp: cleanup bus speed handling
[PATCH] PCI: fix pci_request_region[s] arg
[PATCH] PCI: Provide a boot parameter to disable MSI
[PATCH] PCI: the scheduled removal of PCI_LEGACY_PROC
[PATCH] PCI: cpqphp_ctrl.c: board_replaced(): remove dead code
[PATCH] acpiphp: fix bridge handle
[PATCH] acpiphp - slot management fix - V4
[PATCH] acpi: remove dock event handling from ibm_acpi
[PATCH] acpiphp: add dock event handling
[PATCH] acpi: export acpi_bus_trim
[PATCH] acpiphp: add new bus to acpi
[PATCH] PCI: Move pci_dev_put outside a spinlock
[PATCH] PCI: PCI/Cardbus cards hidden, needs pci=assign-busses to fix
[PATCH] PCI: fix problems with MSI-X on ia64
...
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 0aa14c92b570..f22f69ac6445 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -53,11 +53,10 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count) | |||
53 | if (fields < 0) | 53 | if (fields < 0) |
54 | return -EINVAL; | 54 | return -EINVAL; |
55 | 55 | ||
56 | dynid = kmalloc(sizeof(*dynid), GFP_KERNEL); | 56 | dynid = kzalloc(sizeof(*dynid), GFP_KERNEL); |
57 | if (!dynid) | 57 | if (!dynid) |
58 | return -ENOMEM; | 58 | return -ENOMEM; |
59 | 59 | ||
60 | memset(dynid, 0, sizeof(*dynid)); | ||
61 | INIT_LIST_HEAD(&dynid->node); | 60 | INIT_LIST_HEAD(&dynid->node); |
62 | dynid->id.vendor = vendor; | 61 | dynid->id.vendor = vendor; |
63 | dynid->id.device = device; | 62 | dynid->id.device = device; |
@@ -380,14 +379,6 @@ int __pci_register_driver(struct pci_driver *drv, struct module *owner) | |||
380 | /* initialize common driver fields */ | 379 | /* initialize common driver fields */ |
381 | drv->driver.name = drv->name; | 380 | drv->driver.name = drv->name; |
382 | drv->driver.bus = &pci_bus_type; | 381 | drv->driver.bus = &pci_bus_type; |
383 | /* FIXME, once all of the existing PCI drivers have been fixed to set | ||
384 | * the pci shutdown function, this test can go away. */ | ||
385 | if (!drv->driver.shutdown) | ||
386 | drv->driver.shutdown = pci_device_shutdown; | ||
387 | else | ||
388 | printk(KERN_WARNING "Warning: PCI driver %s has a struct " | ||
389 | "device_driver shutdown method, please update!\n", | ||
390 | drv->name); | ||
391 | drv->driver.owner = owner; | 382 | drv->driver.owner = owner; |
392 | drv->driver.kobj.ktype = &pci_driver_kobj_type; | 383 | drv->driver.kobj.ktype = &pci_driver_kobj_type; |
393 | 384 | ||
@@ -514,6 +505,7 @@ struct bus_type pci_bus_type = { | |||
514 | .probe = pci_device_probe, | 505 | .probe = pci_device_probe, |
515 | .remove = pci_device_remove, | 506 | .remove = pci_device_remove, |
516 | .suspend = pci_device_suspend, | 507 | .suspend = pci_device_suspend, |
508 | .shutdown = pci_device_shutdown, | ||
517 | .resume = pci_device_resume, | 509 | .resume = pci_device_resume, |
518 | .dev_attrs = pci_dev_attrs, | 510 | .dev_attrs = pci_dev_attrs, |
519 | }; | 511 | }; |