projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into upstream
[powerpc.git]
/
drivers
/
acpi
/
container.c
diff --git
a/drivers/acpi/container.c
b/drivers/acpi/container.c
index
27ec12c
..
871aa52
100644
(file)
--- a/
drivers/acpi/container.c
+++ b/
drivers/acpi/container.c
@@
-73,17
+73,16
@@
static int is_device_present(acpi_handle handle)
acpi_status status;
unsigned long sta;
acpi_status status;
unsigned long sta;
- ACPI_FUNCTION_TRACE("is_device_present");
status = acpi_get_handle(handle, "_STA", &temp);
if (ACPI_FAILURE(status))
status = acpi_get_handle(handle, "_STA", &temp);
if (ACPI_FAILURE(status))
- return
_VALUE(1);
/* _STA not found, assmue device present */
+ return
1;
/* _STA not found, assmue device present */
status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
if (ACPI_FAILURE(status))
status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
if (ACPI_FAILURE(status))
- return
_VALUE(0);
/* Firmware error */
+ return
0;
/* Firmware error */
- return
_VALUE
((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT);
+ return
((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT);
}
/*******************************************************************/
}
/*******************************************************************/
@@
-91,16
+90,15
@@
static int acpi_container_add(struct acpi_device *device)
{
struct acpi_container *container;
{
struct acpi_container *container;
- ACPI_FUNCTION_TRACE("acpi_container_add");
if (!device) {
if (!device) {
-
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "device is NULL\n")
);
- return
_VALUE(-EINVAL)
;
+
printk(KERN_ERR PREFIX "device is NULL\n"
);
+ return
-EINVAL
;
}
container = kmalloc(sizeof(struct acpi_container), GFP_KERNEL);
if (!container)
}
container = kmalloc(sizeof(struct acpi_container), GFP_KERNEL);
if (!container)
- return
_VALUE(-ENOMEM)
;
+ return
-ENOMEM
;
memset(container, 0, sizeof(struct acpi_container));
container->handle = device->handle;
memset(container, 0, sizeof(struct acpi_container));
container->handle = device->handle;
@@
-111,7
+109,7
@@
static int acpi_container_add(struct acpi_device *device)
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device <%s> bid <%s>\n",
acpi_device_name(device), acpi_device_bid(device)));
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device <%s> bid <%s>\n",
acpi_device_name(device), acpi_device_bid(device)));
- return
_VALUE(0)
;
+ return
0
;
}
static int acpi_container_remove(struct acpi_device *device, int type)
}
static int acpi_container_remove(struct acpi_device *device, int type)
@@
-130,23
+128,22
@@
static int container_device_add(struct acpi_device **device, acpi_handle handle)
struct acpi_device *pdev;
int result;
struct acpi_device *pdev;
int result;
- ACPI_FUNCTION_TRACE("container_device_add");
if (acpi_get_parent(handle, &phandle)) {
if (acpi_get_parent(handle, &phandle)) {
- return
_VALUE(-ENODEV)
;
+ return
-ENODEV
;
}
if (acpi_bus_get_device(phandle, &pdev)) {
}
if (acpi_bus_get_device(phandle, &pdev)) {
- return
_VALUE(-ENODEV)
;
+ return
-ENODEV
;
}
if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_DEVICE)) {
}
if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_DEVICE)) {
- return
_VALUE(-ENODEV)
;
+ return
-ENODEV
;
}
result = acpi_bus_start(*device);
}
result = acpi_bus_start(*device);
- return
_VALUE(result)
;
+ return
result
;
}
static void container_notify_cb(acpi_handle handle, u32 type, void *context)
}
static void container_notify_cb(acpi_handle handle, u32 type, void *context)
@@
-156,7
+153,6
@@
static void container_notify_cb(acpi_handle handle, u32 type, void *context)
int present;
acpi_status status;
int present;
acpi_status status;
- ACPI_FUNCTION_TRACE("container_notify_cb");
present = is_device_present(handle);
present = is_device_present(handle);
@@
-172,27
+168,27
@@
static void container_notify_cb(acpi_handle handle, u32 type, void *context)
if (ACPI_FAILURE(status) || !device) {
result = container_device_add(&device, handle);
if (!result)
if (ACPI_FAILURE(status) || !device) {
result = container_device_add(&device, handle);
if (!result)
- kobject_
hotplug
(&device->kobj,
-
KOBJ_ONLINE);
+ kobject_
uevent
(&device->kobj,
+ KOBJ_ONLINE);
else
printk("Failed to add container\n");
}
} else {
if (ACPI_SUCCESS(status)) {
/* device exist and this is a remove request */
else
printk("Failed to add container\n");
}
} else {
if (ACPI_SUCCESS(status)) {
/* device exist and this is a remove request */
- kobject_
hotplug
(&device->kobj, KOBJ_OFFLINE);
+ kobject_
uevent
(&device->kobj, KOBJ_OFFLINE);
}
}
break;
case ACPI_NOTIFY_EJECT_REQUEST:
if (!acpi_bus_get_device(handle, &device) && device) {
}
}
break;
case ACPI_NOTIFY_EJECT_REQUEST:
if (!acpi_bus_get_device(handle, &device) && device) {
- kobject_
hotplug
(&device->kobj, KOBJ_OFFLINE);
+ kobject_
uevent
(&device->kobj, KOBJ_OFFLINE);
}
break;
default:
break;
}
}
break;
default:
break;
}
- return
_VOID
;
+ return;
}
static acpi_status
}
static acpi_status
@@
-205,11
+201,10
@@
container_walk_namespace_cb(acpi_handle handle,
acpi_status status;
int *action = context;
acpi_status status;
int *action = context;
- ACPI_FUNCTION_TRACE("container_walk_namespace_cb");
status = acpi_get_object_info(handle, &buffer);
if (ACPI_FAILURE(status) || !buffer.pointer) {
status = acpi_get_object_info(handle, &buffer);
if (ACPI_FAILURE(status) || !buffer.pointer) {
- return
_ACPI_STATUS(AE_OK)
;
+ return
AE_OK
;
}
info = buffer.pointer;
}
info = buffer.pointer;
@@
-241,9
+236,9
@@
container_walk_namespace_cb(acpi_handle handle,
}
end:
}
end:
-
acpi_os_
free(buffer.pointer);
+
k
free(buffer.pointer);
- return
_ACPI_STATUS(AE_OK)
;
+ return
AE_OK
;
}
static int __init acpi_container_init(void)
}
static int __init acpi_container_init(void)
@@
-269,7
+264,6
@@
static void __exit acpi_container_exit(void)
{
int action = UNINSTALL_NOTIFY_HANDLER;
{
int action = UNINSTALL_NOTIFY_HANDLER;
- ACPI_FUNCTION_TRACE("acpi_container_exit");
acpi_walk_namespace(ACPI_TYPE_DEVICE,
ACPI_ROOT_OBJECT,
acpi_walk_namespace(ACPI_TYPE_DEVICE,
ACPI_ROOT_OBJECT,
@@
-278,7
+272,7
@@
static void __exit acpi_container_exit(void)
acpi_bus_unregister_driver(&acpi_container_driver);
acpi_bus_unregister_driver(&acpi_container_driver);
- return
_VOID
;
+ return;
}
module_init(acpi_container_init);
}
module_init(acpi_container_init);