Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211059
b: refs/heads/master
c: f539dfe
h: refs/heads/master
i:
  211057: bf02da6
  211055: 3e3f549
v: v3
  • Loading branch information
Simon Guinot authored and Nicolas Pitre committed Sep 20, 2010
1 parent 4d67ef9 commit 0d9a304
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c4a90588fa07ea47df7a67fd6cb03d6bc0f99634
refs/heads/master: f539dfedbd169e5ed47912bb517c75976ab556f3
9 changes: 5 additions & 4 deletions trunk/drivers/leds/leds-ns2.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static int ns2_led_get_mode(struct ns2_led_data *led_dat,
int cmd_level;
int slow_level;

read_lock(&led_dat->rw_lock);
read_lock_irq(&led_dat->rw_lock);

cmd_level = gpio_get_value(led_dat->cmd);
slow_level = gpio_get_value(led_dat->slow);
Expand All @@ -95,7 +95,7 @@ static int ns2_led_get_mode(struct ns2_led_data *led_dat,
}
}

read_unlock(&led_dat->rw_lock);
read_unlock_irq(&led_dat->rw_lock);

return ret;
}
Expand All @@ -104,8 +104,9 @@ static void ns2_led_set_mode(struct ns2_led_data *led_dat,
enum ns2_led_modes mode)
{
int i;
unsigned long flags;

write_lock(&led_dat->rw_lock);
write_lock_irqsave(&led_dat->rw_lock, flags);

for (i = 0; i < ARRAY_SIZE(ns2_led_modval); i++) {
if (mode == ns2_led_modval[i].mode) {
Expand All @@ -116,7 +117,7 @@ static void ns2_led_set_mode(struct ns2_led_data *led_dat,
}
}

write_unlock(&led_dat->rw_lock);
write_unlock_irqrestore(&led_dat->rw_lock, flags);
}

static void ns2_led_set(struct led_classdev *led_cdev,
Expand Down

0 comments on commit 0d9a304

Please sign in to comment.