Browse Source

ideapad: Only allow camera state to be set to 0 or 1

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Woodhouse 15 years ago
parent
commit
2016e4a0a1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/platform/x86/ideapad_acpi.c

+ 1 - 1
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;