aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/android
AgeCommit message (Collapse)Author
2009-06-19Staging: android: fix Kconfig issuesGreg Kroah-Hartman
Wrap all ANDROID config items with a #if to keep from asking if you want specific Android drivers even if you say N to CONFIG_ANDROID Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: binder: fix up some checkpatch warningsGreg Kroah-Hartman
This cleans up the majority of the checkpatch warnings in the android binder driver. All that is left now is a bunch of too-long-line stuff. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: ram_console: fix up remaining checkpatch warningsGreg Kroah-Hartman
This cleans up the last of the checkpatch warnings in the android ram_console driver. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: logger: fix up remaining checkpatch warningsGreg Kroah-Hartman
This cleans up the last of the checkpatch warnings in the android logger driver. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: lowmemorykiller: fix up remaining checkpatch warningsGreg Kroah-Hartman
This cleans up the last of the checkpatch warnings in the android lowmemorykiller driver. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: timed_gpio: Separate timed_output class into a separate ↵Mike Lockwood
driver. Signed-off-by: Mike Lockwood <lockwood@android.com> Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: lowmemorykiller: fix possible android low memory killer ↵David Rientjes
NULL pointer get_mm_rss() atomically dereferences the actual without checking for a NULL pointer, which is possible since task_lock() is not held. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: lowmemorykiller: cleanup android low memory killerDavid Rientjes
Clean up the code in lowmem_shrink() for the Android low memory killer so that it follows the kernel coding style. It's unnecessary to check for p->oomkilladj >= min_adj if the selected task's oomkilladj score is stored since get_mm_rss() will always be greater than zero. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: lowmemorykiller: Don't count free space unless it meets ↵Arve Hjønnevåg
the specified limit by itself From: Arve Hjønnevåg <arve@android.com> This allows processes to be killed when the kernel evict cache pages in an attempt to get more contiguous free memory. Signed-off-by: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Cc: San Mehat <san@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: lowmemorykiller: Only iterate over process list when needed.Arve Hjønnevåg
Use NR_ACTIVE plus NR_INACTIVE as a size estimate for our fake cache instead the sum of rss. Neither method is accurate. Also skip the process scan, if the amount of memory available is above the largest threshold set. Signed-off-by: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Cc: San Mehat <san@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17Staging: binder: Defer flush and release operations to avoid deadlocks.Arve Hjønnevåg
If a transaction that contains a file descriptor fails on a later object, the new file descriptor needs to be closed. If this is a binder file descriptor we would deadlock in flush. If there were no other references to the file at this point release would also be called. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17Staging: binder: Prevent the wrong thread from adding a transaction to the ↵Arve Hjønnevåg
stack. If a thread is part of a transaction stack, it is only allowed to make another call if it was the target of the top transaction on the stack. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17Staging: binder: Cast to uintptr_t instead of size_t when aligning pointersArve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17Staging: binder: Keep a reference to the files_struct while the driver is ↵Arve Hjønnevåg
mmapped This prevents breaking fget_light if a single threaded application allows incoming file descriptors (in replies or on nodes). Should also prevent inserting a file in the wrong files_struct if the receving process execs in the middle of a transaction (between task_get_unused_fd_flags and task_fd_install). Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17Staging: binder: Add more offset validation.Arve Hjønnevåg
Check that datasize is not smaller than one flat_binder_object. Check that offsets are aligned. Check that offsets_size is aligned. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17Staging: binder: mmap fixes.Arve Hjønnevåg
Only allow a binder file pointer to be mmapped once. The buffer management code cannot deal with more then one area. Also remove leftover mutex_unlock if mmap fails. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17Staging: binder: Don't create two proc entries with the same name if the ↵Arve Hjønnevåg
driver is opened twice in one process. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17Staging: binder: Remove VM_EXEC check.Arve Hjønnevåg
Many platforms do not support mappings without VM_EXEC. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: Android: fix more printk formatsRandy Dunlap
Fix more android ram_console printk format warnings: drivers/staging/android/ram_console.c:238: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' drivers/staging/android/ram_console.c:238: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: android: ram_console: fix printk format warningRandy Dunlap
Fix android printk format warnings: linux-next-20090209/drivers/staging/android/ram_console.c:228: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' linux-next-20090209/drivers/staging/android/ram_console.c:228: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' linux-next-20090209/drivers/staging/android/ram_console.c:326: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'size_t' linux-next-20090209/drivers/staging/android/ram_console.c:326: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: android: binder: fix printk format warningsRandy Dunlap
Fix printk format warnings in android binder: drivers/staging/android/binder.c:2652: warning: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pgprotval_t' drivers/staging/android/binder.c:2659: warning: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pgprotval_t' drivers/staging/android/binder.c:2680: warning: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pgprotval_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-09Staging: android: fix up units in timed_gpioGreg Kroah-Hartman
The last build fix I did messed up the units of the sysfs file. This puts them back to be milliseconds, like they originally were. Thanks to Juha Motorsportcom for pointing this out. Reported-by: Juha Motorsportcom <juha_motorsportcom@luukku.com> Cc: Mike Lockwood <lockwood@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-09Staging: android: ram_console: Disable ECC when early init is enabled and ↵Arve Hjønnevåg
validate buffer size Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28Staging: android: task_get_unused_fd_flags: fix the wrong usage of tsk->signalOleg Nesterov
Compile tested. task_struct->signal is not protected by RCU, the code is bogus. Change the code to take ->siglock to pin ->signal. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28Staging: android: Add lowmemorykiller documentation.Arve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28Staging: android: fix build error on 64bit boxesGreg Kroah-Hartman
ktime_t isn't ment to directly access on all arches, so use the proper conversion functions instead to figure out what time is remaining. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: Mike Lockwood <lockwood@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28Staging: android: timed_gpio: Fix build to build on kernels after 2.6.25.Arve Hjønnevåg
Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Mike Lockwood <lockwood@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28Staging: android: binder: fix arm build errorsArve Hjønnevåg
Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: android: binder: fix build errorsGreg Kroah-Hartman
This fixes the build errors and warnings in the binder driver. It can't be a module, due to a lack of some of the symbols being exported. Also added a MODULE_LICENSE(), as it was missing. Cc: Arve Hjønnevåg <arve@android.com> Cc: Brian Swetland <swetland@google.com> Cc: Robert Love <rlove@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: android: add lowmemorykiller driverSan Mehat
From: San Mehat <san@android.com> Cc: Brian Swetland <swetland@google.com> Cc: Robert Love <rlove@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: android: remove dummy android.c driverGreg Kroah-Hartman
There are files now in the drivers/staging/android/ directory, so the dummy android.c file can be safely removed. Cc: Robert Love <rlove@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: android: timed_gpio: Rename android_timed_gpio to timed_gpioMike Lockwood
Signed-off-by: Mike Lockwood <lockwood@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: android: add timed_gpio driverMike Lockwood
driver for GPIOs that turn back off after a delay From: Mike Lockwood <lockwood@android.com> Signed-off-by: Brian Swetland <swetland@google.com> Cc: Robert Love <rlove@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: android: add ram_console driverArve Hjønnevåg
Doesn't quite link properly under all configurations, and it has way too many different build options, but it's a start. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Brian Swetland <swetland@google.com> Cc: Robert Love <rlove@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: android: add logging driverRobert Love
Signed-off-by: Robert Love <rlove@google.com> Signed-off-by: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06staging: android: binder: Fix use of euidJ.R. Mauro
Task credentials were moved and must be accessed through task_struct.cred Signed-off-by: J.R. Mauro <jrm8005@gmail.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: Brian Swetland <swetland@google.com> Cc: Robert Love <rlove@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: android: binder: Fix gcc warnings about improper format specifiers ↵J.R. Mauro
for size_t in printk Use the proper format specifiers for printing size_t values. Signed-off-by: J.R. Mauro <jrm8005@gmail.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: Brian Swetland <swetland@google.com> Cc: Robert Love <rlove@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: android: add binder driverArve Hjønnevåg
It builds, but not as a module, and with lots of warnings. I also had to fix up a few syntax errors to get it to build properly, I'm doubting that anyone has built it in a while :( Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Brian Swetland <swetland@google.com> Cc: Robert Love <rlove@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: add android frameworkGreg Kroah-Hartman
This prepares us to start adding the android drivers to the build. The dummy android.c file will go away in the next few patches, as it will not be needed once drivers/staging/android/ has a driver in it. Cc: Robert Love <rlove@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>