aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/i2c/busses/scx200_acb.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index 0d6bd4f7b7fa..dc64f8b6b24a 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -388,7 +388,7 @@ static const struct i2c_algorithm scx200_acb_algorithm = {
388}; 388};
389 389
390static struct scx200_acb_iface *scx200_acb_list; 390static struct scx200_acb_iface *scx200_acb_list;
391static DECLARE_MUTEX(scx200_acb_list_mutex); 391static DEFINE_MUTEX(scx200_acb_list_mutex);
392 392
393static __init int scx200_acb_probe(struct scx200_acb_iface *iface) 393static __init int scx200_acb_probe(struct scx200_acb_iface *iface)
394{ 394{
@@ -472,10 +472,10 @@ static int __init scx200_acb_create(struct scx200_acb_iface *iface)
472 return -ENODEV; 472 return -ENODEV;
473 } 473 }
474 474
475 down(&scx200_acb_list_mutex); 475 mutex_lock(&scx200_acb_list_mutex);
476 iface->next = scx200_acb_list; 476 iface->next = scx200_acb_list;
477 scx200_acb_list = iface; 477 scx200_acb_list = iface;
478 up(&scx200_acb_list_mutex); 478 mutex_unlock(&scx200_acb_list_mutex);
479 479
480 return 0; 480 return 0;
481} 481}
@@ -633,10 +633,10 @@ static void __exit scx200_acb_cleanup(void)
633{ 633{
634 struct scx200_acb_iface *iface; 634 struct scx200_acb_iface *iface;
635 635
636 down(&scx200_acb_list_mutex); 636 mutex_lock(&scx200_acb_list_mutex);
637 while ((iface = scx200_acb_list) != NULL) { 637 while ((iface = scx200_acb_list) != NULL) {
638 scx200_acb_list = iface->next; 638 scx200_acb_list = iface->next;
639 up(&scx200_acb_list_mutex); 639 mutex_unlock(&scx200_acb_list_mutex);
640 640
641 i2c_del_adapter(&iface->adapter); 641 i2c_del_adapter(&iface->adapter);
642 642
@@ -648,9 +648,9 @@ static void __exit scx200_acb_cleanup(void)
648 release_region(iface->base, 8); 648 release_region(iface->base, 8);
649 649
650 kfree(iface); 650 kfree(iface);
651 down(&scx200_acb_list_mutex); 651 mutex_lock(&scx200_acb_list_mutex);
652 } 652 }
653 up(&scx200_acb_list_mutex); 653 mutex_unlock(&scx200_acb_list_mutex);
654} 654}
655 655
656module_init(scx200_acb_init); 656module_init(scx200_acb_init);