Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ps3: gelic: scan_lock semaphore to mutex

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Acked-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Daniel Walker and committed by
John W. Linville
706ddd60 b77ec4ca

+10 -10
+9 -9
drivers/net/ps3_gelic_wireless.c
··· 695 695 unsigned long this_time = jiffies; 696 696 697 697 pr_debug("%s: <-\n", __func__); 698 - if (down_interruptible(&wl->scan_lock)) 698 + if (mutex_lock_interruptible(&wl->scan_lock)) 699 699 return -EAGAIN; 700 700 701 701 switch (wl->scan_stat) { ··· 733 733 wrqu->data.length = ev - extra; 734 734 wrqu->data.flags = 0; 735 735 out: 736 - up(&wl->scan_lock); 736 + mutex_unlock(&wl->scan_lock); 737 737 pr_debug("%s: -> %d %d\n", __func__, ret, wrqu->data.length); 738 738 return ret; 739 739 } ··· 1554 1554 int ret = 0; 1555 1555 1556 1556 pr_debug("%s: <- always=%d\n", __func__, always_scan); 1557 - if (down_interruptible(&wl->scan_lock)) 1557 + if (mutex_lock_interruptible(&wl->scan_lock)) 1558 1558 return -ERESTARTSYS; 1559 1559 1560 1560 /* ··· 1588 1588 } 1589 1589 kfree(cmd); 1590 1590 out: 1591 - up(&wl->scan_lock); 1591 + mutex_unlock(&wl->scan_lock); 1592 1592 pr_debug("%s: ->\n", __func__); 1593 1593 return ret; 1594 1594 } ··· 1610 1610 DECLARE_MAC_BUF(mac); 1611 1611 1612 1612 pr_debug("%s:start\n", __func__); 1613 - down(&wl->scan_lock); 1613 + mutex_lock(&wl->scan_lock); 1614 1614 1615 1615 if (wl->scan_stat != GELIC_WL_SCAN_STAT_SCANNING) { 1616 1616 /* ··· 1727 1727 NULL); 1728 1728 out: 1729 1729 complete(&wl->scan_done); 1730 - up(&wl->scan_lock); 1730 + mutex_unlock(&wl->scan_lock); 1731 1731 pr_debug("%s:end\n", __func__); 1732 1732 } 1733 1733 ··· 2282 2282 wait_for_completion(&wl->scan_done); 2283 2283 2284 2284 pr_debug("%s: scan done\n", __func__); 2285 - down(&wl->scan_lock); 2285 + mutex_lock(&wl->scan_lock); 2286 2286 if (wl->scan_stat != GELIC_WL_SCAN_STAT_GOT_LIST) { 2287 2287 gelic_wl_send_iwap_event(wl, NULL); 2288 2288 pr_info("%s: no scan list. association failed\n", __func__); ··· 2302 2302 if (ret) 2303 2303 pr_info("%s: association failed %d\n", __func__, ret); 2304 2304 scan_lock_out: 2305 - up(&wl->scan_lock); 2305 + mutex_unlock(&wl->scan_lock); 2306 2306 out: 2307 2307 up(&wl->assoc_stat_lock); 2308 2308 } ··· 2431 2431 2432 2432 INIT_DELAYED_WORK(&wl->event_work, gelic_wl_event_worker); 2433 2433 INIT_DELAYED_WORK(&wl->assoc_work, gelic_wl_assoc_worker); 2434 - init_MUTEX(&wl->scan_lock); 2434 + mutex_init(&wl->scan_lock); 2435 2435 init_MUTEX(&wl->assoc_stat_lock); 2436 2436 2437 2437 init_completion(&wl->scan_done);
+1 -1
drivers/net/ps3_gelic_wireless.h
··· 241 241 #define GELIC_WEP_KEYS 4 242 242 struct gelic_wl_info { 243 243 /* bss list */ 244 - struct semaphore scan_lock; 244 + struct mutex scan_lock; 245 245 struct list_head network_list; 246 246 struct list_head network_free_list; 247 247 struct gelic_wl_scan_info *networks;