aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/dream/camera/s5k3e2fx.c
AgeCommit message (Collapse)Author
2010-03-04Staging: Merge two branches of coding style fixes togetherGreg Kroah-Hartman
Turns out that multiple people sent pretty much the same patch for the same staging drivers. Commit these in two different branches and merge them together to get a more complete coverage of the cleanup and properly credit everyone for the work that they did. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04Staging: dream: camera: sk5k3e2fx: fix code style issuesChihau Chau
This fixes some code style issues about assignments in if conditions. Signed-off-by: Chihau Chau <chihau@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03staging: dream: more Code style fixesJochen Maes
Removed parenthesis from return statements, split up assignment and if condition Signed-off-by: Jochen Maes <jochen.maes@sejo.be> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: s5k3e2fx.c: simplify complexity by factoringJustin Madru
the code was looping, setting s_move[i] to the following calculations if (actual_step>= 0) s_move[i] = ((((i + 1) * gain + 0x200) - (i * gain + 0x200)) / 0x400); else s_move[i] = ((((i + 1) * gain - 0x200) - (i * gain - 0x200)) / 0x400); but, this code reduces to the expression s_move[i] = gain>> 10; The reason for the complexity was to generate a step function with integer division and rounding to land on specific values. But these calculations can be simplified to the following code: gain = ((actual_step<< 10) / 5)>> 10; for (i = 0; i<= 4; i++) s_move[i] = gain; Signed-off-by: Justin Madru<jdm64@gawab.com> Reviewed-by: Ray Lee<ray-lk@madrabbit.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: HTC Dream: add camera supportBrian Swetland
This patch adds driver for HTC Dream camera. I guess driver is slightly higher quality than usual for staging/ , but it is fairly big and I don't feel like doing all the cleanups myself. Also some parts can probably be removed, as they did not end up in shipping hardware.. Signed-off-by: Pavel Machek <pavel@ucw.cz> Cc: Brian Swetland <swetland@google.com> Cc: Iliyan Malchev <ibm@android.com> Cc: San Mehat <san@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>