diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-22 21:46:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-22 21:46:56 -0500 |
commit | 18ed1c051317ac3a685120cead2adb192b802347 (patch) | |
tree | c08a9147119a6cb69114166c7107f6b0bba6e2ab /drivers/acpi/pci_root.c | |
parent | dab6df63086762629936e8b89a5984bae39724f6 (diff) | |
parent | 36bcbec7ce21e2e8b3143b11a05747330abeca70 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (68 commits)
ACPI: replace kmalloc+memset with kzalloc
ACPI: Add support for acpi_load_table/acpi_unload_table_id
fbdev: update after backlight argument change
ACPI: video: Add dev argument for backlight_device_register
ACPI: Implement acpi_video_get_next_level()
ACPI: Kconfig - depend on PM rather than selecting it
ACPI: fix NULL check in drivers/acpi/osl.c
ACPI: make drivers/acpi/ec.c:ec_ecdt static
ACPI: prevent processor module from loading on failures
ACPI: fix single linked list manipulation
ACPI: ibm_acpi: allow clean removal
ACPI: fix git automerge failure
ACPI: ibm_acpi: respond to workqueue update
ACPI: dock: add uevent to indicate change in device status
ACPI: ec: Lindent once again
ACPI: ec: Change #define to enums there possible.
ACPI: ec: Style changes.
ACPI: ec: Acquire Global Lock under EC mutex.
ACPI: ec: Drop udelay() from poll mode. Loop by reading status field instead.
ACPI: ec: Rename gpe_bit to gpe
...
Diffstat (limited to 'drivers/acpi/pci_root.c')
-rw-r--r-- | drivers/acpi/pci_root.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 0984a1ee24ed..a860efa2c562 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -98,11 +98,12 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver) | |||
98 | 98 | ||
99 | struct acpi_pci_driver **pptr = &sub_driver; | 99 | struct acpi_pci_driver **pptr = &sub_driver; |
100 | while (*pptr) { | 100 | while (*pptr) { |
101 | if (*pptr != driver) | 101 | if (*pptr == driver) |
102 | continue; | 102 | break; |
103 | *pptr = (*pptr)->next; | 103 | pptr = &(*pptr)->next; |
104 | break; | ||
105 | } | 104 | } |
105 | BUG_ON(!*pptr); | ||
106 | *pptr = (*pptr)->next; | ||
106 | 107 | ||
107 | if (!driver->remove) | 108 | if (!driver->remove) |
108 | return; | 109 | return; |
@@ -119,7 +120,7 @@ EXPORT_SYMBOL(acpi_pci_unregister_driver); | |||
119 | static acpi_status | 120 | static acpi_status |
120 | get_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) | 121 | get_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) |
121 | { | 122 | { |
122 | int *busnr = (int *)data; | 123 | int *busnr = data; |
123 | struct acpi_resource_address64 address; | 124 | struct acpi_resource_address64 address; |
124 | 125 | ||
125 | if (resource->type != ACPI_RESOURCE_TYPE_ADDRESS16 && | 126 | if (resource->type != ACPI_RESOURCE_TYPE_ADDRESS16 && |
@@ -164,10 +165,9 @@ static int acpi_pci_root_add(struct acpi_device *device) | |||
164 | if (!device) | 165 | if (!device) |
165 | return -EINVAL; | 166 | return -EINVAL; |
166 | 167 | ||
167 | root = kmalloc(sizeof(struct acpi_pci_root), GFP_KERNEL); | 168 | root = kzalloc(sizeof(struct acpi_pci_root), GFP_KERNEL); |
168 | if (!root) | 169 | if (!root) |
169 | return -ENOMEM; | 170 | return -ENOMEM; |
170 | memset(root, 0, sizeof(struct acpi_pci_root)); | ||
171 | INIT_LIST_HEAD(&root->node); | 171 | INIT_LIST_HEAD(&root->node); |
172 | 172 | ||
173 | root->device = device; | 173 | root->device = device; |
@@ -331,7 +331,7 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type) | |||
331 | if (!device || !acpi_driver_data(device)) | 331 | if (!device || !acpi_driver_data(device)) |
332 | return -EINVAL; | 332 | return -EINVAL; |
333 | 333 | ||
334 | root = (struct acpi_pci_root *)acpi_driver_data(device); | 334 | root = acpi_driver_data(device); |
335 | 335 | ||
336 | kfree(root); | 336 | kfree(root); |
337 | 337 | ||