summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android/timed_output.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: android: timed_output: fix sysfs file creation raceGreg Kroah-Hartman2013-08-241-17/+10
| | | | | | | | | | | The sysfs file for the driver was being created _after_ the device was announced to userspace, causing a race with any tools looking for sysfs files. Fix the race by using the default attribute group for the class. Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: avoid format string in dev_set_nameKees Cook2013-07-031-1/+1
| | | | | | | | | | | Calling dev_set_name with a single paramter causes it to be handled as a format string. Many callers are passing potentially dynamic string content, so use "%s" in those cases to avoid any potential accidents, including wrappers like device_create*() and bdi_register(). Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* staging: Android: Fix some checkpatch warningsSachin Kamat2012-06-121-1/+3
| | | | | | | | Warnings reported by checkpatch.pl have been fixed. Cc: Brian Swetland <swetland@google.com> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: timed_output : disable the timed output device when the ↵Kim, Milo2012-04-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | device is unregistered (Life cycle of timed output device driver) 1) register the device as the timed output 2) enable() ops is called via the sysfs timeout > 0 : timer is activated and device is turned on timeout = 0 : timer is cancelled and device is off 3) unregister the timed output device if not used any more So the registered device should be disabled explicitly when the module is removed. ('disabled' means the timer is stopped and the device is turned off) Rather than implementing that code in each driver, just call enable() with timeout = 0 to clean up the driver. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Cc: Mike Lockwood <lockwood@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: android: timed_gpio: Properly discard invalid timeout values.Mike Lockwood2011-11-301-1/+3
| | | | | | | | | The timed output device never previously checked the return value of sscanf, resulting in an uninitialized int being passed to enable() if input value was invalid. Signed-off-by: Mike Lockwood <lockwood@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Revert "Staging: android: delete android drivers"Greg Kroah-Hartman2011-11-301-0/+121
| | | | | | | | | | | | | | This reverts commit b0a0ccfad85b3657fe999805df65f5cfe634ab8a. Turns out I was wrong, we want these in the tree. Note, I've disabled the drivers from the build at the moment, so other patches can be applied to fix some build issues due to internal api changes since the code was removed from the tree. Cc: Arve Hjønnevåg <arve@android.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: android: delete android driversGreg Kroah-Hartman2009-12-111-121/+0
| | | | | | | | | | | | These drivers are no longer being developed and the original authors seem to have abandonded them and hence, do not want them in the mainline kernel tree. So sad :( Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: android: timed_gpio: Separate timed_output class into a separate ↵Mike Lockwood2009-06-191-0/+121
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>
OpenPOWER on IntegriCloud