git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
acpi
/
pci_bind.c
diff --git
a/drivers/acpi/pci_bind.c
b/drivers/acpi/pci_bind.c
index
1e2ae6e
..
55f57a6
100644
(file)
--- a/
drivers/acpi/pci_bind.c
+++ b/
drivers/acpi/pci_bind.c
@@
-122,19
+122,17
@@
int acpi_pci_bind(struct acpi_device *device)
if (!device || !device->parent)
return -EINVAL;
if (!device || !device->parent)
return -EINVAL;
- pathname = k
m
alloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
+ pathname = k
z
alloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
if (!pathname)
return -ENOMEM;
if (!pathname)
return -ENOMEM;
- memset(pathname, 0, ACPI_PATHNAME_MAX);
buffer.length = ACPI_PATHNAME_MAX;
buffer.pointer = pathname;
buffer.length = ACPI_PATHNAME_MAX;
buffer.pointer = pathname;
- data = k
m
alloc(sizeof(struct acpi_pci_data), GFP_KERNEL);
+ data = k
z
alloc(sizeof(struct acpi_pci_data), GFP_KERNEL);
if (!data) {
kfree(pathname);
return -ENOMEM;
}
if (!data) {
kfree(pathname);
return -ENOMEM;
}
- memset(data, 0, sizeof(struct acpi_pci_data));
acpi_get_name(device->handle, ACPI_FULL_PATHNAME, &buffer);
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Binding PCI device [%s]...\n",
acpi_get_name(device->handle, ACPI_FULL_PATHNAME, &buffer);
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Binding PCI device [%s]...\n",
@@
-281,10
+279,9
@@
int acpi_pci_unbind(struct acpi_device *device)
if (!device || !device->parent)
return -EINVAL;
if (!device || !device->parent)
return -EINVAL;
- pathname =
(char *)km
alloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
+ pathname =
kz
alloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
if (!pathname)
return -ENOMEM;
if (!pathname)
return -ENOMEM;
- memset(pathname, 0, ACPI_PATHNAME_MAX);
buffer.length = ACPI_PATHNAME_MAX;
buffer.pointer = pathname;
buffer.length = ACPI_PATHNAME_MAX;
buffer.pointer = pathname;
@@
-331,11
+328,9
@@
acpi_pci_bind_root(struct acpi_device *device,
char *pathname = NULL;
struct acpi_buffer buffer = { 0, NULL };
char *pathname = NULL;
struct acpi_buffer buffer = { 0, NULL };
-
- pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
+ pathname = kzalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
if (!pathname)
return -ENOMEM;
if (!pathname)
return -ENOMEM;
- memset(pathname, 0, ACPI_PATHNAME_MAX);
buffer.length = ACPI_PATHNAME_MAX;
buffer.pointer = pathname;
buffer.length = ACPI_PATHNAME_MAX;
buffer.pointer = pathname;
@@
-345,12
+340,11
@@
acpi_pci_bind_root(struct acpi_device *device,
return -EINVAL;
}
return -EINVAL;
}
- data = k
m
alloc(sizeof(struct acpi_pci_data), GFP_KERNEL);
+ data = k
z
alloc(sizeof(struct acpi_pci_data), GFP_KERNEL);
if (!data) {
kfree(pathname);
return -ENOMEM;
}
if (!data) {
kfree(pathname);
return -ENOMEM;
}
- memset(data, 0, sizeof(struct acpi_pci_data));
data->id = *id;
data->bus = bus;
data->id = *id;
data->bus = bus;