[PATCH] idmouse cleanup and overflow fix
[PATCH] idmouse cleanup and overflow fix

switched to simple_read_from_buffer(), killed broken use of min().
Incidentally, that use of min() had been fixed once, only to be
reintroduced in commit 4244f72436ab77c3c29a6447af81734ab3925d85:

    [PATCH] USB: upgrade of the idmouse driver

[snip]
-       if (count > IMGSIZE - *ppos)
-               count = IMGSIZE - *ppos;
+       count = min ((loff_t)count, IMGSIZE - (*ppos));

Note the lovely use of cast to shut the warning about misuse of min()
up...

Signed-off-by: Al Viro <de609eb4d5d70b1d38ec6642adbfc33a2781f63c@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@osdl.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs