summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2010-08-11 16:59:51 (GMT)
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-08-11 17:00:52 (GMT)
commit2016e4a0a1c49b68c9d820e28dadab7080c45d1b (patch)
tree6d69dc0ad0ec90c30f301f76f49a06330a7449fe /drivers/platform
parentce326329d72238196d61312d1cf1556ebaf94da7 (diff)
downloadlinux-2016e4a0a1c49b68c9d820e28dadab7080c45d1b.tar.xz
ideapad: Only allow camera state to be set to 0 or 1
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/ideapad_acpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/ideapad_acpi.c b/drivers/platform/x86/ideapad_acpi.c
index 8a89902..7984963 100644
--- a/drivers/platform/x86/ideapad_acpi.c
+++ b/drivers/platform/x86/ideapad_acpi.c
@@ -140,7 +140,7 @@ static ssize_t store_ideapad_cam(struct device *dev,
return 0;
if (sscanf(buf, "%i", &state) != 1)
return -EINVAL;
- ret = ideapad_dev_set_state(IDEAPAD_DEV_CAMERA, state);
+ ret = ideapad_dev_set_state(IDEAPAD_DEV_CAMERA, !!state);
if (ret < 0)
return ret;
return count;