Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58807
b: refs/heads/master
c: 9d9c01c
h: refs/heads/master
i:
  58805: 994c30c
  58803: 2255e19
  58799: 973f741
v: v3
  • Loading branch information
Matthias Kaehlcke authored and Jean Delvare committed Jul 12, 2007
1 parent 44ac788 commit 51cbd0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: d75d53cd571c02990d56e72f615ab11e943772f9
refs/heads/master: 9d9c01ceff00fcba50043f500cac471ecf6752c9
14 changes: 7 additions & 7 deletions trunk/drivers/i2c/busses/scx200_acb.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ static const struct i2c_algorithm scx200_acb_algorithm = {
};

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

static __init int scx200_acb_probe(struct scx200_acb_iface *iface)
{
Expand Down Expand Up @@ -472,10 +472,10 @@ static int __init scx200_acb_create(struct scx200_acb_iface *iface)
return -ENODEV;
}

down(&scx200_acb_list_mutex);
mutex_lock(&scx200_acb_list_mutex);
iface->next = scx200_acb_list;
scx200_acb_list = iface;
up(&scx200_acb_list_mutex);
mutex_unlock(&scx200_acb_list_mutex);

return 0;
}
Expand Down Expand Up @@ -633,10 +633,10 @@ static void __exit scx200_acb_cleanup(void)
{
struct scx200_acb_iface *iface;

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

i2c_del_adapter(&iface->adapter);

Expand All @@ -648,9 +648,9 @@ static void __exit scx200_acb_cleanup(void)
release_region(iface->base, 8);

kfree(iface);
down(&scx200_acb_list_mutex);
mutex_lock(&scx200_acb_list_mutex);
}
up(&scx200_acb_list_mutex);
mutex_unlock(&scx200_acb_list_mutex);
}

module_init(scx200_acb_init);
Expand Down

0 comments on commit 51cbd0f

Please sign in to comment.