diff options
author | Sven-Thorsten Dietrich <sdietrich@novell.com> | 2010-02-23 21:59:18 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-04 00:43:04 (GMT) |
commit | c852ab66727558e7fb9c994a12ff30cc3d0e2448 (patch) | |
tree | c66b4d0052107e1aca4737f055a4331da37257a0 /drivers/staging/iio | |
parent | 21b0838c1a03686277e0cfeda42015e4538b9ea3 (diff) | |
download | linux-fsl-qoriq-c852ab66727558e7fb9c994a12ff30cc3d0e2448.tar.xz |
Staging: make drivers use spin_lock_init()
This fixes some RT-triggered compile errors and typos.
Signed-off-by: Sven-Thorsten Dietrich <sdietrich@novell.com>
Acked-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/ring_generic.h | 3 | ||||
-rw-r--r-- | drivers/staging/iio/ring_sw.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/iio/ring_generic.h b/drivers/staging/iio/ring_generic.h index 93b91b2..09044ad 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 b746cf6..6f7f4d5 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; |