From: David Woodhouse Date: Wed, 11 Aug 2010 16:59:51 +0000 (+0100) Subject: ideapad: Only allow camera state to be set to 0 or 1 X-Git-Tag: v3.0~3603^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2016e4a0a1c49b68c9d820e28dadab7080c45d1b;p=platform%2Fkernel%2Flinux-amlogic.git ideapad: Only allow camera state to be set to 0 or 1 Signed-off-by: David Woodhouse --- 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;