Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23235
b: refs/heads/master
c: 8a05940
h: refs/heads/master
i:
  23233: eaf7e4c
  23231: ecfeade
v: v3
  • Loading branch information
Ben Gardner authored and Greg Kroah-Hartman committed Mar 23, 2006
1 parent 96f6b79 commit 64eaf68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 9b7b6d3b2b46c5c336a441ed12b504ee192e63b3
refs/heads/master: 8a05940d742174a87427a3fe746712d49d4b8c4b
13 changes: 7 additions & 6 deletions trunk/drivers/i2c/busses/scx200_acb.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ static struct i2c_algorithm scx200_acb_algorithm = {
};

static struct scx200_acb_iface *scx200_acb_list;
static DECLARE_MUTEX(scx200_acb_list_mutex);

static int scx200_acb_probe(struct scx200_acb_iface *iface)
{
Expand Down Expand Up @@ -463,10 +464,10 @@ static int __init scx200_acb_create(int base, int index)
goto errout_release;
}

lock_kernel();
down(&scx200_acb_list_mutex);
iface->next = scx200_acb_list;
scx200_acb_list = iface;
unlock_kernel();
up(&scx200_acb_list_mutex);

return 0;

Expand Down Expand Up @@ -509,17 +510,17 @@ static void __exit scx200_acb_cleanup(void)
{
struct scx200_acb_iface *iface;

lock_kernel();
down(&scx200_acb_list_mutex);
while ((iface = scx200_acb_list) != NULL) {
scx200_acb_list = iface->next;
unlock_kernel();
up(&scx200_acb_list_mutex);

i2c_del_adapter(&iface->adapter);
release_region(iface->base, 8);
kfree(iface);
lock_kernel();
down(&scx200_acb_list_mutex);
}
unlock_kernel();
up(&scx200_acb_list_mutex);
}

module_init(scx200_acb_init);
Expand Down

0 comments on commit 64eaf68

Please sign in to comment.