diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-10-30 05:06:57 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-30 06:12:50 -0400 |
commit | 45f4d0243525b6bc747c946937ced437b135a84d (patch) | |
tree | 02849b0719997d5017763fe8de44a007124ac3c1 /drivers | |
parent | 51dfacdef38b1dd6fc58b03dd1725d517516b115 (diff) |
staging: Final semaphore cleanup
Fixup the last remaining users of DECLARE_MUTEX and init_MUTEX.
Scripted conversion, resulting code is binary equivalent.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
LKML-Reference: <20100907125057.278833764@linutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/ath6kl/os/linux/ar6000_raw_if.c | 4 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 4 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wl_mac80211.c | 2 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/dt9812.c | 2 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/usbdux.c | 4 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/usbduxfast.c | 4 | ||||
-rw-r--r-- | drivers/staging/dream/camera/mt9d112.c | 2 | ||||
-rw-r--r-- | drivers/staging/dream/camera/mt9p012_fox.c | 2 | ||||
-rw-r--r-- | drivers/staging/dream/camera/mt9t013.c | 2 | ||||
-rw-r--r-- | drivers/staging/dream/camera/s5k3e2fx.c | 2 | ||||
-rw-r--r-- | drivers/staging/msm/msm_fb.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8712/osdep_service.h | 2 | ||||
-rw-r--r-- | drivers/staging/smbfs/inode.c | 2 | ||||
-rw-r--r-- | drivers/staging/westbridge/astoria/block/cyasblkdev_block.c | 2 | ||||
-rw-r--r-- | drivers/staging/westbridge/astoria/block/cyasblkdev_queue.c | 2 |
15 files changed, 20 insertions, 20 deletions
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c index c196098f0859..6b8eeea475cf 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c | |||
@@ -198,8 +198,8 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar) | |||
198 | 198 | ||
199 | for (streamID = HTC_RAW_STREAM_0; streamID < HTC_RAW_STREAM_NUM_MAX; streamID++) { | 199 | for (streamID = HTC_RAW_STREAM_0; streamID < HTC_RAW_STREAM_NUM_MAX; streamID++) { |
200 | /* Initialize the data structures */ | 200 | /* Initialize the data structures */ |
201 | init_MUTEX(&arRaw->raw_htc_read_sem[streamID]); | 201 | sema_init(&arRaw->raw_htc_read_sem[streamID], 1); |
202 | init_MUTEX(&arRaw->raw_htc_write_sem[streamID]); | 202 | sema_init(&arRaw->raw_htc_write_sem[streamID], 1); |
203 | init_waitqueue_head(&arRaw->raw_htc_read_queue[streamID]); | 203 | init_waitqueue_head(&arRaw->raw_htc_read_queue[streamID]); |
204 | init_waitqueue_head(&arRaw->raw_htc_write_queue[streamID]); | 204 | init_waitqueue_head(&arRaw->raw_htc_write_queue[streamID]); |
205 | 205 | ||
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c index e5357875661f..bbbe7c5f7492 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c | |||
@@ -1929,7 +1929,7 @@ dhd_pub_t *dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen) | |||
1929 | goto fail; | 1929 | goto fail; |
1930 | 1930 | ||
1931 | net->netdev_ops = NULL; | 1931 | net->netdev_ops = NULL; |
1932 | init_MUTEX(&dhd->proto_sem); | 1932 | sema_init(&dhd->proto_sem, 1); |
1933 | /* Initialize other structure content */ | 1933 | /* Initialize other structure content */ |
1934 | init_waitqueue_head(&dhd->ioctl_resp_wait); | 1934 | init_waitqueue_head(&dhd->ioctl_resp_wait); |
1935 | init_waitqueue_head(&dhd->ctrl_wait); | 1935 | init_waitqueue_head(&dhd->ctrl_wait); |
@@ -1977,7 +1977,7 @@ dhd_pub_t *dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen) | |||
1977 | dhd->timer.function = dhd_watchdog; | 1977 | dhd->timer.function = dhd_watchdog; |
1978 | 1978 | ||
1979 | /* Initialize thread based operation and lock */ | 1979 | /* Initialize thread based operation and lock */ |
1980 | init_MUTEX(&dhd->sdsem); | 1980 | sema_init(&dhd->sdsem, 1); |
1981 | if ((dhd_watchdog_prio >= 0) && (dhd_dpc_prio >= 0)) | 1981 | if ((dhd_watchdog_prio >= 0) && (dhd_dpc_prio >= 0)) |
1982 | dhd->threads_only = true; | 1982 | dhd->threads_only = true; |
1983 | else | 1983 | else |
diff --git a/drivers/staging/brcm80211/sys/wl_mac80211.c b/drivers/staging/brcm80211/sys/wl_mac80211.c index ad635ee7758e..d060377629ac 100644 --- a/drivers/staging/brcm80211/sys/wl_mac80211.c +++ b/drivers/staging/brcm80211/sys/wl_mac80211.c | |||
@@ -866,7 +866,7 @@ static wl_info_t *wl_attach(u16 vendor, u16 device, unsigned long regs, | |||
866 | spin_lock_init(&wl->rpcq_lock); | 866 | spin_lock_init(&wl->rpcq_lock); |
867 | spin_lock_init(&wl->txq_lock); | 867 | spin_lock_init(&wl->txq_lock); |
868 | 868 | ||
869 | init_MUTEX(&wl->sem); | 869 | sema_init(&wl->sem, 1); |
870 | #else | 870 | #else |
871 | spin_lock_init(&wl->lock); | 871 | spin_lock_init(&wl->lock); |
872 | spin_lock_init(&wl->isr_lock); | 872 | spin_lock_init(&wl->isr_lock); |
diff --git a/drivers/staging/comedi/drivers/dt9812.c b/drivers/staging/comedi/drivers/dt9812.c index 0560a7451512..06059850dae2 100644 --- a/drivers/staging/comedi/drivers/dt9812.c +++ b/drivers/staging/comedi/drivers/dt9812.c | |||
@@ -262,7 +262,7 @@ struct dt9812_usb_cmd { | |||
262 | 262 | ||
263 | #define DT9812_NUM_SLOTS 16 | 263 | #define DT9812_NUM_SLOTS 16 |
264 | 264 | ||
265 | static DECLARE_MUTEX(dt9812_mutex); | 265 | static DEFINE_SEMAPHORE(dt9812_mutex); |
266 | 266 | ||
267 | static const struct usb_device_id dt9812_table[] = { | 267 | static const struct usb_device_id dt9812_table[] = { |
268 | {USB_DEVICE(0x0867, 0x9812)}, | 268 | {USB_DEVICE(0x0867, 0x9812)}, |
diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index 6131e2dd0591..1f177a67ff11 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c | |||
@@ -315,7 +315,7 @@ struct usbduxsub { | |||
315 | */ | 315 | */ |
316 | static struct usbduxsub usbduxsub[NUMUSBDUX]; | 316 | static struct usbduxsub usbduxsub[NUMUSBDUX]; |
317 | 317 | ||
318 | static DECLARE_MUTEX(start_stop_sem); | 318 | static DEFINE_SEMAPHORE(start_stop_sem); |
319 | 319 | ||
320 | /* | 320 | /* |
321 | * Stops the data acquision | 321 | * Stops the data acquision |
@@ -2367,7 +2367,7 @@ static int usbduxsub_probe(struct usb_interface *uinterf, | |||
2367 | dev_dbg(dev, "comedi_: usbdux: " | 2367 | dev_dbg(dev, "comedi_: usbdux: " |
2368 | "usbduxsub[%d] is ready to connect to comedi.\n", index); | 2368 | "usbduxsub[%d] is ready to connect to comedi.\n", index); |
2369 | 2369 | ||
2370 | init_MUTEX(&(usbduxsub[index].sem)); | 2370 | sema_init(&(usbduxsub[index].sem), 1); |
2371 | /* save a pointer to the usb device */ | 2371 | /* save a pointer to the usb device */ |
2372 | usbduxsub[index].usbdev = udev; | 2372 | usbduxsub[index].usbdev = udev; |
2373 | 2373 | ||
diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c index 0a164a9a66c3..5b15e6df54e6 100644 --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c | |||
@@ -199,7 +199,7 @@ struct usbduxfastsub_s { | |||
199 | */ | 199 | */ |
200 | static struct usbduxfastsub_s usbduxfastsub[NUMUSBDUXFAST]; | 200 | static struct usbduxfastsub_s usbduxfastsub[NUMUSBDUXFAST]; |
201 | 201 | ||
202 | static DECLARE_MUTEX(start_stop_sem); | 202 | static DEFINE_SEMAPHORE(start_stop_sem); |
203 | 203 | ||
204 | /* | 204 | /* |
205 | * bulk transfers to usbduxfast | 205 | * bulk transfers to usbduxfast |
@@ -1504,7 +1504,7 @@ static int usbduxfastsub_probe(struct usb_interface *uinterf, | |||
1504 | "connect to comedi.\n", index); | 1504 | "connect to comedi.\n", index); |
1505 | #endif | 1505 | #endif |
1506 | 1506 | ||
1507 | init_MUTEX(&(usbduxfastsub[index].sem)); | 1507 | sema_init(&(usbduxfastsub[index].sem), 1); |
1508 | /* save a pointer to the usb device */ | 1508 | /* save a pointer to the usb device */ |
1509 | usbduxfastsub[index].usbdev = udev; | 1509 | usbduxfastsub[index].usbdev = udev; |
1510 | 1510 | ||
diff --git a/drivers/staging/dream/camera/mt9d112.c b/drivers/staging/dream/camera/mt9d112.c index e6f2d5124611..27c978f8a6cd 100644 --- a/drivers/staging/dream/camera/mt9d112.c +++ b/drivers/staging/dream/camera/mt9d112.c | |||
@@ -37,7 +37,7 @@ struct mt9d112_ctrl { | |||
37 | static struct mt9d112_ctrl *mt9d112_ctrl; | 37 | static struct mt9d112_ctrl *mt9d112_ctrl; |
38 | 38 | ||
39 | static DECLARE_WAIT_QUEUE_HEAD(mt9d112_wait_queue); | 39 | static DECLARE_WAIT_QUEUE_HEAD(mt9d112_wait_queue); |
40 | DECLARE_MUTEX(mt9d112_sem); | 40 | DEFINE_SEMAPHORE(mt9d112_sem); |
41 | 41 | ||
42 | 42 | ||
43 | /*============================================================= | 43 | /*============================================================= |
diff --git a/drivers/staging/dream/camera/mt9p012_fox.c b/drivers/staging/dream/camera/mt9p012_fox.c index 791bd6c40615..544a9732b592 100644 --- a/drivers/staging/dream/camera/mt9p012_fox.c +++ b/drivers/staging/dream/camera/mt9p012_fox.c | |||
@@ -123,7 +123,7 @@ struct mt9p012_ctrl { | |||
123 | 123 | ||
124 | static struct mt9p012_ctrl *mt9p012_ctrl; | 124 | static struct mt9p012_ctrl *mt9p012_ctrl; |
125 | static DECLARE_WAIT_QUEUE_HEAD(mt9p012_wait_queue); | 125 | static DECLARE_WAIT_QUEUE_HEAD(mt9p012_wait_queue); |
126 | DECLARE_MUTEX(mt9p012_sem); | 126 | DEFINE_SEMAPHORE(mt9p012_sem); |
127 | 127 | ||
128 | /*============================================================= | 128 | /*============================================================= |
129 | EXTERNAL DECLARATIONS | 129 | EXTERNAL DECLARATIONS |
diff --git a/drivers/staging/dream/camera/mt9t013.c b/drivers/staging/dream/camera/mt9t013.c index 8fd7727ba234..75e78aa52820 100644 --- a/drivers/staging/dream/camera/mt9t013.c +++ b/drivers/staging/dream/camera/mt9t013.c | |||
@@ -123,7 +123,7 @@ struct mt9t013_ctrl { | |||
123 | 123 | ||
124 | static struct mt9t013_ctrl *mt9t013_ctrl; | 124 | static struct mt9t013_ctrl *mt9t013_ctrl; |
125 | static DECLARE_WAIT_QUEUE_HEAD(mt9t013_wait_queue); | 125 | static DECLARE_WAIT_QUEUE_HEAD(mt9t013_wait_queue); |
126 | DECLARE_MUTEX(mt9t013_sem); | 126 | DEFINE_SEMAPHORE(mt9t013_sem); |
127 | 127 | ||
128 | extern struct mt9t013_reg mt9t013_regs; /* from mt9t013_reg.c */ | 128 | extern struct mt9t013_reg mt9t013_regs; /* from mt9t013_reg.c */ |
129 | 129 | ||
diff --git a/drivers/staging/dream/camera/s5k3e2fx.c b/drivers/staging/dream/camera/s5k3e2fx.c index 1459903a339d..d66b453b0672 100644 --- a/drivers/staging/dream/camera/s5k3e2fx.c +++ b/drivers/staging/dream/camera/s5k3e2fx.c | |||
@@ -313,7 +313,7 @@ struct s5k3e2fx_i2c_reg_conf { | |||
313 | 313 | ||
314 | static struct s5k3e2fx_ctrl *s5k3e2fx_ctrl; | 314 | static struct s5k3e2fx_ctrl *s5k3e2fx_ctrl; |
315 | static DECLARE_WAIT_QUEUE_HEAD(s5k3e2fx_wait_queue); | 315 | static DECLARE_WAIT_QUEUE_HEAD(s5k3e2fx_wait_queue); |
316 | DECLARE_MUTEX(s5k3e2fx_sem); | 316 | DEFINE_SEMAPHORE(s5k3e2fx_sem); |
317 | 317 | ||
318 | static int s5k3e2fx_i2c_rxdata(unsigned short saddr, unsigned char *rxdata, | 318 | static int s5k3e2fx_i2c_rxdata(unsigned short saddr, unsigned char *rxdata, |
319 | int length) | 319 | int length) |
diff --git a/drivers/staging/msm/msm_fb.c b/drivers/staging/msm/msm_fb.c index ea268edbf43b..23fa049b51f2 100644 --- a/drivers/staging/msm/msm_fb.c +++ b/drivers/staging/msm/msm_fb.c | |||
@@ -1158,7 +1158,7 @@ static int msm_fb_release(struct fb_info *info, int user) | |||
1158 | return ret; | 1158 | return ret; |
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | DECLARE_MUTEX(msm_fb_pan_sem); | 1161 | DEFINE_SEMAPHORE(msm_fb_pan_sem); |
1162 | 1162 | ||
1163 | static int msm_fb_pan_display(struct fb_var_screeninfo *var, | 1163 | static int msm_fb_pan_display(struct fb_var_screeninfo *var, |
1164 | struct fb_info *info) | 1164 | struct fb_info *info) |
@@ -1962,7 +1962,7 @@ static int msmfb_overlay_play(struct fb_info *info, unsigned long *argp) | |||
1962 | 1962 | ||
1963 | #endif | 1963 | #endif |
1964 | 1964 | ||
1965 | DECLARE_MUTEX(msm_fb_ioctl_ppp_sem); | 1965 | DEFINE_SEMAPHORE(msm_fb_ioctl_ppp_sem); |
1966 | DEFINE_MUTEX(msm_fb_ioctl_lut_sem); | 1966 | DEFINE_MUTEX(msm_fb_ioctl_lut_sem); |
1967 | DEFINE_MUTEX(msm_fb_ioctl_hist_sem); | 1967 | DEFINE_MUTEX(msm_fb_ioctl_hist_sem); |
1968 | 1968 | ||
diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h index 7fca42c7c0d4..d1674cd282dc 100644 --- a/drivers/staging/rtl8712/osdep_service.h +++ b/drivers/staging/rtl8712/osdep_service.h | |||
@@ -161,7 +161,7 @@ static inline u32 _down_sema(struct semaphore *sema) | |||
161 | 161 | ||
162 | static inline void _rtl_rwlock_init(struct semaphore *prwlock) | 162 | static inline void _rtl_rwlock_init(struct semaphore *prwlock) |
163 | { | 163 | { |
164 | init_MUTEX(prwlock); | 164 | sema_init(prwlock, 1); |
165 | } | 165 | } |
166 | 166 | ||
167 | static inline void _init_listhead(struct list_head *list) | 167 | static inline void _init_listhead(struct list_head *list) |
diff --git a/drivers/staging/smbfs/inode.c b/drivers/staging/smbfs/inode.c index 552951aa7498..fa42f40fa226 100644 --- a/drivers/staging/smbfs/inode.c +++ b/drivers/staging/smbfs/inode.c | |||
@@ -537,7 +537,7 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent) | |||
537 | server->mnt = NULL; | 537 | server->mnt = NULL; |
538 | server->sock_file = NULL; | 538 | server->sock_file = NULL; |
539 | init_waitqueue_head(&server->conn_wq); | 539 | init_waitqueue_head(&server->conn_wq); |
540 | init_MUTEX(&server->sem); | 540 | sema_init(&server->sem, 1); |
541 | INIT_LIST_HEAD(&server->entry); | 541 | INIT_LIST_HEAD(&server->entry); |
542 | INIT_LIST_HEAD(&server->xmitq); | 542 | INIT_LIST_HEAD(&server->xmitq); |
543 | INIT_LIST_HEAD(&server->recvq); | 543 | INIT_LIST_HEAD(&server->recvq); |
diff --git a/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c b/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c index f428a7af357a..e1851f00be56 100644 --- a/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c +++ b/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c | |||
@@ -157,7 +157,7 @@ struct cyasblkdev_blk_data { | |||
157 | /* pointer to west bridge block data device superstructure */ | 157 | /* pointer to west bridge block data device superstructure */ |
158 | static struct cyasblkdev_blk_data *gl_bd; | 158 | static struct cyasblkdev_blk_data *gl_bd; |
159 | 159 | ||
160 | static DECLARE_MUTEX(open_lock); | 160 | static DEFINE_SEMAPHORE(open_lock); |
161 | 161 | ||
162 | /* local forwardd declarationss */ | 162 | /* local forwardd declarationss */ |
163 | static cy_as_device_handle *cyas_dev_handle; | 163 | static cy_as_device_handle *cyas_dev_handle; |
diff --git a/drivers/staging/westbridge/astoria/block/cyasblkdev_queue.c b/drivers/staging/westbridge/astoria/block/cyasblkdev_queue.c index 24e959eca412..0bbb8a3e191d 100644 --- a/drivers/staging/westbridge/astoria/block/cyasblkdev_queue.c +++ b/drivers/staging/westbridge/astoria/block/cyasblkdev_queue.c | |||
@@ -334,7 +334,7 @@ int cyasblkdev_init_queue(struct cyasblkdev_queue *bq, spinlock_t *lock) | |||
334 | 334 | ||
335 | init_completion(&bq->thread_complete); | 335 | init_completion(&bq->thread_complete); |
336 | init_waitqueue_head(&bq->thread_wq); | 336 | init_waitqueue_head(&bq->thread_wq); |
337 | init_MUTEX(&bq->thread_sem); | 337 | sema_init(&bq->thread_sem, 1); |
338 | 338 | ||
339 | ret = kernel_thread(cyasblkdev_queue_thread, bq, CLONE_KERNEL); | 339 | ret = kernel_thread(cyasblkdev_queue_thread, bq, CLONE_KERNEL); |
340 | if (ret >= 0) { | 340 | if (ret >= 0) { |