DOCUMENTATION: Use newer DEFINE_SPINLOCK macro in docs.
authorRobert P. J. Day <rpjday@crashcourse.ca>
Mon, 21 Apr 2008 22:44:50 +0000 (22:44 +0000)
committerJesper Juhl <juhl@hera.kernel.org>
Mon, 21 Apr 2008 22:44:50 +0000 (22:44 +0000)
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Documentation/DocBook/kernel-locking.tmpl
Documentation/block/biodoc.txt
Documentation/cli-sti-removal.txt

index 2e9d6b41f034594b3b1af87c97ab1da81f5caccd..22ebd27a257ef2b2fa286e79dda5c8a1d24ca027 100644 (file)
@@ -854,7 +854,7 @@ The change is shown below, in standard patch format: the
  };
 
 -static DEFINE_MUTEX(cache_lock);
-+static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED;
++static DEFINE_SPINLOCK(cache_lock);
  static LIST_HEAD(cache);
  static unsigned int cache_num = 0;
  #define MAX_CACHE_SIZE 10
@@ -1238,7 +1238,7 @@ Here is the "lock-per-object" implementation:
 -        int popularity;
  };
 
- static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED;
+ static DEFINE_SPINLOCK(cache_lock);
 @@ -77,6 +84,7 @@
          obj-&gt;id = id;
          obj-&gt;popularity = 0;
index 93f223b9723f8c66d81e92edd290f607d5469c34..4dbb8be1c991c3b4049d69ff68c99c12e5f34ce3 100644 (file)
@@ -1097,7 +1097,7 @@ lock themselves, if required. Drivers that explicitly used the
 io_request_lock for serialization need to be modified accordingly.
 Usually it's as easy as adding a global lock:
 
-       static spinlock_t my_driver_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(my_driver_lock);
 
 and passing the address to that lock to blk_init_queue().
 
index 0223c9d203319b9869802c10dd50dd86d7ee1565..60932b02fcb333a8c4bd60e4ac0e8296f33c8784 100644 (file)
@@ -43,7 +43,7 @@ would execute while the cli()-ed section is executing.
 
 but from now on a more direct method of locking has to be used:
 
-       spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
+       DEFINE_SPINLOCK(driver_lock);
        struct driver_data;
 
        irq_handler (...)