Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208537
b: refs/heads/master
c: ecd6269
h: refs/heads/master
i:
  208535: 572afed
v: v3
  • Loading branch information
Jens Rottmann authored and Linus Torvalds committed Aug 11, 2010
1 parent 14eb706 commit c789673
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e73790a57abc1320b3c3a94da43ae24359687d7c
refs/heads/master: ecd6269174c04da5efbd17d6bff793e428eb45ef
11 changes: 11 additions & 0 deletions trunk/drivers/misc/cs5535-mfgpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,17 @@ EXPORT_SYMBOL_GPL(cs5535_mfgpt_alloc_timer);
*/
void cs5535_mfgpt_free_timer(struct cs5535_mfgpt_timer *timer)
{
unsigned long flags;
uint16_t val;

/* timer can be made available again only if never set up */
val = cs5535_mfgpt_read(timer, MFGPT_REG_SETUP);
if (!(val & MFGPT_SETUP_SETUP)) {
spin_lock_irqsave(&timer->chip->lock, flags);
__set_bit(timer->nr, timer->chip->avail);
spin_unlock_irqrestore(&timer->chip->lock, flags);
}

kfree(timer);
}
EXPORT_SYMBOL_GPL(cs5535_mfgpt_free_timer);
Expand Down

0 comments on commit c789673

Please sign in to comment.