Skip to content

Commit

Permalink
ideapad: Only allow camera state to be set to 0 or 1
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Aug 11, 2010
1 parent ce32632 commit 2016e4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/ideapad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2016e4a

Please sign in to comment.