Re: [PATCH] staging drivers use spin_lock_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Feb 23 2010, Sven-Thorsten Dietrich wrote:

Subject: Convert driver-staging to use spin_lock_init()

This fixes some RT-triggered compile errors and typos.

Against 2.6.33-rc8. Push upstream as you see appropriate.

Thanks.

Signed-off-by: Sven-Thorsten Dietrich <sdietrich@xxxxxxxxxx>
For the two IIO patches, Acked-by: Jonathan Cameron <jic23@xxxxxxxxx>

Thanks for the fix!

Jonathan

Index: linux-2.6.32-slert-devel/drivers/staging/batman-adv/device.c
===================================================================
--- linux-2.6.32-slert-devel.orig/drivers/staging/batman-adv/device.c
+++ linux-2.6.32-slert-devel/drivers/staging/batman-adv/device.c
@@ -118,9 +118,9 @@ int bat_device_open(struct inode *inode,

	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;

Index: linux-2.6.32-slert-devel/drivers/staging/iio/ring_generic.h
===================================================================
--- linux-2.6.32-slert-devel.orig/drivers/staging/iio/ring_generic.h
+++ linux-2.6.32-slert-devel/drivers/staging/iio/ring_generic.h
@@ -145,10 +145,9 @@ static inline void __iio_init_ring_buffe
	ring->bpd = bytes_per_datum;
	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);
}

/**
* struct iio_scan_el - an individual element of a scan diff -u -r linux-2.6.32.orig/drivers/staging/iio/ring_sw.c linux-2.6.32.orig-bak/drivers/staging/iio/ring_sw.c --- linux-2.6.32.orig/drivers/staging/iio/ring_sw.c 2009-12-02 19:51:21.000000000 -0800 +++ linux-2.6.32.orig-bak/drivers/staging/iio/ring_sw.c 2010-02-22 19:04:42.171671961 -0800 @@ -21,7 +21,7 @@
		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;




--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux