projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d87c3f0
)
drivers/misc: beautify code: chip->lux_calib is u16 which will never more than APDS_RANGE
author
Chen Gang
<gang.chen@asianux.com>
Wed, 27 Feb 2013 05:56:16 +0000
(13:56 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 18:12:38 +0000
(11:12 -0700)
APDS_RANGE is 65535, chip->lux_calib is u16 (never more than APDS_RANGE).
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/apds990x.c
patch
|
blob
|
history
diff --git
a/drivers/misc/apds990x.c
b/drivers/misc/apds990x.c
index 0e67f8263cd8bf421c939ae8870f5e4503af2961..1efb6a4ea39730d30919cc7b442d4cd43d77a737 100644
(file)
--- a/
drivers/misc/apds990x.c
+++ b/
drivers/misc/apds990x.c
@@
-700,9
+700,6
@@
static ssize_t apds990x_lux_calib_store(struct device *dev,
if (strict_strtoul(buf, 0, &value))
return -EINVAL;
- if (chip->lux_calib > APDS_RANGE)
- return -EINVAL;
-
chip->lux_calib = value;
return len;