git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[pandora-kernel.git]
/
drivers
/
acpi
/
osl.c
diff --git
a/drivers/acpi/osl.c
b/drivers/acpi/osl.c
index
1bb558a
..
eedb05c
100644
(file)
--- a/
drivers/acpi/osl.c
+++ b/
drivers/acpi/osl.c
@@
-25,7
+25,6
@@
*
*/
*
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
@@
-137,6
+136,7
@@
void acpi_os_vprintf(const char *fmt, va_list args)
#endif
}
#endif
}
+
extern int acpi_in_resume;
void *acpi_os_allocate(acpi_size size)
{
extern int acpi_in_resume;
void *acpi_os_allocate(acpi_size size)
{
@@
-146,13
+146,6
@@
void *acpi_os_allocate(acpi_size size)
return kmalloc(size, GFP_KERNEL);
}
return kmalloc(size, GFP_KERNEL);
}
-void acpi_os_free(void *ptr)
-{
- kfree(ptr);
-}
-
-EXPORT_SYMBOL(acpi_os_free);
-
acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
{
if (efi_enabled) {
acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
{
if (efi_enabled) {
@@
-280,7
+273,7
@@
acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler,
acpi_irq_handler = handler;
acpi_irq_context = context;
acpi_irq_handler = handler;
acpi_irq_context = context;
- if (request_irq(irq, acpi_irq,
SA_SHIRQ
, "acpi", acpi_irq)) {
+ if (request_irq(irq, acpi_irq,
IRQF_SHARED
, "acpi", acpi_irq)) {
printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq);
return AE_NOT_ACQUIRED;
}
printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq);
return AE_NOT_ACQUIRED;
}
@@
-586,19
+579,18
@@
static void acpi_os_execute_deferred(void *context)
{
struct acpi_os_dpc *dpc = NULL;
{
struct acpi_os_dpc *dpc = NULL;
- ACPI_FUNCTION_TRACE("os_execute_deferred");
dpc = (struct acpi_os_dpc *)context;
if (!dpc) {
dpc = (struct acpi_os_dpc *)context;
if (!dpc) {
-
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid (NULL) context.\n")
);
- return
_VOID
;
+
printk(KERN_ERR PREFIX "Invalid (NULL) context\n"
);
+ return;
}
dpc->function(dpc->context);
kfree(dpc);
}
dpc->function(dpc->context);
kfree(dpc);
- return
_VOID
;
+ return;
}
static int acpi_os_execute_thread(void *context)
}
static int acpi_os_execute_thread(void *context)
@@
-688,35
+680,19
@@
EXPORT_SYMBOL(acpi_os_wait_events_complete);
/*
* Allocate the memory for a spinlock and initialize it.
*/
/*
* Allocate the memory for a spinlock and initialize it.
*/
-acpi_status acpi_os_create_lock(acpi_
handle * out_
handle)
+acpi_status acpi_os_create_lock(acpi_
spinlock *
handle)
{
{
- spinlock_t *lock_ptr;
-
- ACPI_FUNCTION_TRACE("os_create_lock");
+ spin_lock_init(*handle);
- lock_ptr = acpi_os_allocate(sizeof(spinlock_t));
-
- spin_lock_init(lock_ptr);
-
- ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating spinlock[%p].\n", lock_ptr));
-
- *out_handle = lock_ptr;
-
- return_ACPI_STATUS(AE_OK);
+ return AE_OK;
}
/*
* Deallocate the memory for a spinlock.
*/
}
/*
* Deallocate the memory for a spinlock.
*/
-void acpi_os_delete_lock(acpi_
handle
handle)
+void acpi_os_delete_lock(acpi_
spinlock
handle)
{
{
- ACPI_FUNCTION_TRACE("os_create_lock");
-
- ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting spinlock[%p].\n", handle));
-
- acpi_os_free(handle);
-
- return_VOID;
+ return;
}
acpi_status
}
acpi_status
@@
-724,11
+700,10
@@
acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle)
{
struct semaphore *sem = NULL;
{
struct semaphore *sem = NULL;
- ACPI_FUNCTION_TRACE("os_create_semaphore");
sem = acpi_os_allocate(sizeof(struct semaphore));
if (!sem)
sem = acpi_os_allocate(sizeof(struct semaphore));
if (!sem)
- return
_ACPI_STATUS(AE_NO_MEMORY)
;
+ return
AE_NO_MEMORY
;
memset(sem, 0, sizeof(struct semaphore));
sema_init(sem, initial_units);
memset(sem, 0, sizeof(struct semaphore));
sema_init(sem, initial_units);
@@
-738,7
+713,7
@@
acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle)
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating semaphore[%p|%d].\n",
*handle, initial_units));
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating semaphore[%p|%d].\n",
*handle, initial_units));
- return
_ACPI_STATUS(AE_OK)
;
+ return
AE_OK
;
}
EXPORT_SYMBOL(acpi_os_create_semaphore);
}
EXPORT_SYMBOL(acpi_os_create_semaphore);
@@
-754,17
+729,16
@@
acpi_status acpi_os_delete_semaphore(acpi_handle handle)
{
struct semaphore *sem = (struct semaphore *)handle;
{
struct semaphore *sem = (struct semaphore *)handle;
- ACPI_FUNCTION_TRACE("os_delete_semaphore");
if (!sem)
if (!sem)
- return
_ACPI_STATUS(AE_BAD_PARAMETER)
;
+ return
AE_BAD_PARAMETER
;
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle));
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle));
-
acpi_os_
free(sem);
+
k
free(sem);
sem = NULL;
sem = NULL;
- return
_ACPI_STATUS(AE_OK)
;
+ return
AE_OK
;
}
EXPORT_SYMBOL(acpi_os_delete_semaphore);
}
EXPORT_SYMBOL(acpi_os_delete_semaphore);
@@
-784,13
+758,12
@@
acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout)
struct semaphore *sem = (struct semaphore *)handle;
int ret = 0;
struct semaphore *sem = (struct semaphore *)handle;
int ret = 0;
- ACPI_FUNCTION_TRACE("os_wait_semaphore");
if (!sem || (units < 1))
if (!sem || (units < 1))
- return
_ACPI_STATUS(AE_BAD_PARAMETER)
;
+ return
AE_BAD_PARAMETER
;
if (units > 1)
if (units > 1)
- return
_ACPI_STATUS(AE_SUPPORT)
;
+ return
AE_SUPPORT
;
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Waiting for semaphore[%p|%d|%d]\n",
handle, units, timeout));
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Waiting for semaphore[%p|%d|%d]\n",
handle, units, timeout));
@@
-839,17
+812,17
@@
acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout)
}
if (ACPI_FAILURE(status)) {
}
if (ACPI_FAILURE(status)) {
- ACPI_DEBUG_PRINT((ACPI_DB_
ERROR
,
- "Failed to acquire semaphore[%p|%d|%d], %s
\n
",
+ ACPI_DEBUG_PRINT((ACPI_DB_
MUTEX
,
+ "Failed to acquire semaphore[%p|%d|%d], %s",
handle, units, timeout,
acpi_format_exception(status)));
} else {
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
handle, units, timeout,
acpi_format_exception(status)));
} else {
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
- "Acquired semaphore[%p|%d|%d]
\n
", handle,
+ "Acquired semaphore[%p|%d|%d]", handle,
units, timeout));
}
units, timeout));
}
- return
_ACPI_STATUS(status)
;
+ return
status
;
}
EXPORT_SYMBOL(acpi_os_wait_semaphore);
}
EXPORT_SYMBOL(acpi_os_wait_semaphore);
@@
-861,20
+834,19
@@
acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units)
{
struct semaphore *sem = (struct semaphore *)handle;
{
struct semaphore *sem = (struct semaphore *)handle;
- ACPI_FUNCTION_TRACE("os_signal_semaphore");
if (!sem || (units < 1))
if (!sem || (units < 1))
- return
_ACPI_STATUS(AE_BAD_PARAMETER)
;
+ return
AE_BAD_PARAMETER
;
if (units > 1)
if (units > 1)
- return
_ACPI_STATUS(AE_SUPPORT)
;
+ return
AE_SUPPORT
;
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Signaling semaphore[%p|%d]\n", handle,
units));
up(sem);
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Signaling semaphore[%p|%d]\n", handle,
units));
up(sem);
- return
_ACPI_STATUS(AE_OK)
;
+ return
AE_OK
;
}
EXPORT_SYMBOL(acpi_os_signal_semaphore);
}
EXPORT_SYMBOL(acpi_os_signal_semaphore);
@@
-1043,10
+1015,10
@@
EXPORT_SYMBOL(max_cstate);
* handle is a pointer to the spinlock_t.
*/
* handle is a pointer to the spinlock_t.
*/
-acpi_cpu_flags acpi_os_acquire_lock(acpi_
handle handle
)
+acpi_cpu_flags acpi_os_acquire_lock(acpi_
spinlock lockp
)
{
acpi_cpu_flags flags;
{
acpi_cpu_flags flags;
- spin_lock_irqsave(
(spinlock_t *) handle
, flags);
+ spin_lock_irqsave(
lockp
, flags);
return flags;
}
return flags;
}
@@
-1054,9
+1026,9
@@
acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle)
* Release a spinlock. See above.
*/
* Release a spinlock. See above.
*/
-void acpi_os_release_lock(acpi_
handle handle
, acpi_cpu_flags flags)
+void acpi_os_release_lock(acpi_
spinlock lockp
, acpi_cpu_flags flags)
{
{
- spin_unlock_irqrestore(
(spinlock_t *) handle
, flags);
+ spin_unlock_irqrestore(
lockp
, flags);
}
#ifndef ACPI_USE_LOCAL_CACHE
}
#ifndef ACPI_USE_LOCAL_CACHE