summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android/timed_output.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers/staging: make android timed_output.c explicitly non-modularPaul Gortmaker2015-10-131-13/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Kconfig currently controlling compilation of this code is: drivers/staging/android/Kconfig:config ANDROID_TIMED_OUTPUT drivers/staging/android/Kconfig: bool "Timed output class driver" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We replace module.h with init.h and export.h ; the latter since this file does actually export some symbols. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: "Arve Hjønnevåg" <arve@android.com> Cc: Riley Andrews <riandrews@android.com> Cc: devel@driverdev.osuosl.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: android: timed_output.c: use kstrtoint() instead of sscanf()Murilo Opsfelder Araujo2014-07-311-1/+3
| | | | | | | | | This patch makes checkpatch.pl happy by fixing the following warning: WARNING: Prefer kstrto<type> to single variable sscanf Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: timed_output: fix use after free of devYi Zhang2014-06-201-1/+0Star
| | | | | | | | tdev->dev has been freed in device_destroy(), it's not right to use dev_set_drvdata() after that; Signed-off-by: Yi Zhang <yizhang@marvell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: timed_output: fix sysfs file creation raceGreg Kroah-Hartman2013-08-241-17/+10Star
| | | | | | | | | | | 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-041-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-301-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/+0Star
| | | | | | | | | | | | 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>