Skip to content

Commit

Permalink
Fix: attr: read a long instead of a ulong
Browse files Browse the repository at this point in the history
Otherwise a pulse count of -1 won't work.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
  • Loading branch information
arnout committed Apr 22, 2013
1 parent 0c3a1a8 commit 6ebd671
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion soft_pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static ssize_t pwm_store(
status = -EIO;
}else{
unsigned long value;
status = strict_strtoul(buf, 0, &value);
status = strict_strtol(buf, 0, &value);
if(status==0){
if(strcmp(attr->attr.name, "pulse")==0){
if(value<=desc->period){ desc->pulse = (unsigned int)value; }
Expand Down

0 comments on commit 6ebd671

Please sign in to comment.