Commit c852ab66 authored by Sven-Thorsten Dietrich's avatar Sven-Thorsten Dietrich Committed by Greg Kroah-Hartman

Staging: make drivers use spin_lock_init()

This fixes some RT-triggered compile errors and typos.
Signed-off-by: default avatarSven-Thorsten Dietrich <sdietrich@novell.com>
Acked-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
Acked-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 21b0838c
...@@ -118,7 +118,7 @@ int bat_device_open(struct inode *inode, struct file *file) ...@@ -118,7 +118,7 @@ int bat_device_open(struct inode *inode, struct file *file)
INIT_LIST_HEAD(&device_client->queue_list); INIT_LIST_HEAD(&device_client->queue_list);
device_client->queue_len = 0; device_client->queue_len = 0;
device_client->index = i; 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); init_waitqueue_head(&device_client->queue_wait);
file->private_data = device_client; file->private_data = device_client;
......
...@@ -146,8 +146,7 @@ static inline void __iio_init_ring_buffer(struct iio_ring_buffer *ring, ...@@ -146,8 +146,7 @@ static inline void __iio_init_ring_buffer(struct iio_ring_buffer *ring,
ring->length = length; ring->length = length;
ring->loopcount = 0; ring->loopcount = 0;
ring->shared_ev_pointer.ev_p = 0; ring->shared_ev_pointer.ev_p = 0;
ring->shared_ev_pointer.lock = spin_lock_init(&ring->shared_ev_pointer.lock);
__SPIN_LOCK_UNLOCKED(ring->shared_ev_pointer->loc);
} }
/** /**
......
...@@ -20,7 +20,7 @@ static inline int __iio_init_sw_ring_buffer(struct iio_sw_ring_buffer *ring, ...@@ -20,7 +20,7 @@ static inline int __iio_init_sw_ring_buffer(struct iio_sw_ring_buffer *ring,
return -EINVAL; return -EINVAL;
__iio_init_ring_buffer(&ring->buf, bytes_per_datum, length); __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->data = kmalloc(length*ring->buf.bpd, GFP_KERNEL);
ring->read_p = 0; ring->read_p = 0;
ring->write_p = 0; ring->write_p = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment