diff options
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/batman-adv/device.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/ring_generic.h | 3 | ||||
-rw-r--r-- | drivers/staging/iio/ring_sw.c | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c index 451898cd9ecb..e7f44215b5f3 100644 --- a/drivers/staging/batman-adv/device.c +++ b/drivers/staging/batman-adv/device.c @@ -118,7 +118,7 @@ int bat_device_open(struct inode *inode, struct file *file) INIT_LIST_HEAD(&device_client->queue_list); device_client->queue_len = 0; device_client->index = i; - device_client->lock = __SPIN_LOCK_UNLOCKED(device_client->lock); + spin_lock_init(&device_client->lock); init_waitqueue_head(&device_client->queue_wait); file->private_data = device_client; diff --git a/drivers/staging/iio/ring_generic.h b/drivers/staging/iio/ring_generic.h index 93b91b28a02f..09044adf7327 100644 --- a/drivers/staging/iio/ring_generic.h +++ b/drivers/staging/iio/ring_generic.h @@ -146,8 +146,7 @@ static inline void __iio_init_ring_buffer(struct iio_ring_buffer *ring, ring->length = length; ring->loopcount = 0; ring->shared_ev_pointer.ev_p = 0; - ring->shared_ev_pointer.lock = - __SPIN_LOCK_UNLOCKED(ring->shared_ev_pointer->loc); + spin_lock_init(&ring->shared_ev_pointer.lock); } /** diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c index b746cf603225..6f7f4d5a93f3 100644 --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c @@ -20,7 +20,7 @@ static inline int __iio_init_sw_ring_buffer(struct iio_sw_ring_buffer *ring, return -EINVAL; __iio_init_ring_buffer(&ring->buf, bytes_per_datum, length); - ring->use_lock = __SPIN_LOCK_UNLOCKED((ring)->use_lock); + spin_lock_init(&ring->use_lock); ring->data = kmalloc(length*ring->buf.bpd, GFP_KERNEL); ring->read_p = 0; ring->write_p = 0; |