diff options
author | Robert P. J. Day <rpjday@crashcourse.ca> | 2008-04-21 18:44:50 -0400 |
---|---|---|
committer | Jesper Juhl <juhl@hera.kernel.org> | 2008-04-21 18:44:50 -0400 |
commit | c0d1f29534f2bd6c5992831eb0f648522e9b0204 (patch) | |
tree | 563b800789c2c99527b0b681efeb78fcf938da75 | |
parent | dd89db1df98003fadafa711ab8bc497aaf92980a (diff) |
DOCUMENTATION: Use newer DEFINE_SPINLOCK macro in docs.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
-rw-r--r-- | Documentation/DocBook/kernel-locking.tmpl | 4 | ||||
-rw-r--r-- | Documentation/block/biodoc.txt | 2 | ||||
-rw-r--r-- | Documentation/cli-sti-removal.txt | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl index 2e9d6b41f034..22ebd27a257e 100644 --- a/Documentation/DocBook/kernel-locking.tmpl +++ b/Documentation/DocBook/kernel-locking.tmpl | |||
@@ -854,7 +854,7 @@ The change is shown below, in standard patch format: the | |||
854 | }; | 854 | }; |
855 | 855 | ||
856 | -static DEFINE_MUTEX(cache_lock); | 856 | -static DEFINE_MUTEX(cache_lock); |
857 | +static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED; | 857 | +static DEFINE_SPINLOCK(cache_lock); |
858 | static LIST_HEAD(cache); | 858 | static LIST_HEAD(cache); |
859 | static unsigned int cache_num = 0; | 859 | static unsigned int cache_num = 0; |
860 | #define MAX_CACHE_SIZE 10 | 860 | #define MAX_CACHE_SIZE 10 |
@@ -1238,7 +1238,7 @@ Here is the "lock-per-object" implementation: | |||
1238 | - int popularity; | 1238 | - int popularity; |
1239 | }; | 1239 | }; |
1240 | 1240 | ||
1241 | static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED; | 1241 | static DEFINE_SPINLOCK(cache_lock); |
1242 | @@ -77,6 +84,7 @@ | 1242 | @@ -77,6 +84,7 @@ |
1243 | obj->id = id; | 1243 | obj->id = id; |
1244 | obj->popularity = 0; | 1244 | obj->popularity = 0; |
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index 93f223b9723f..4dbb8be1c991 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
@@ -1097,7 +1097,7 @@ lock themselves, if required. Drivers that explicitly used the | |||
1097 | io_request_lock for serialization need to be modified accordingly. | 1097 | io_request_lock for serialization need to be modified accordingly. |
1098 | Usually it's as easy as adding a global lock: | 1098 | Usually it's as easy as adding a global lock: |
1099 | 1099 | ||
1100 | static spinlock_t my_driver_lock = SPIN_LOCK_UNLOCKED; | 1100 | static DEFINE_SPINLOCK(my_driver_lock); |
1101 | 1101 | ||
1102 | and passing the address to that lock to blk_init_queue(). | 1102 | and passing the address to that lock to blk_init_queue(). |
1103 | 1103 | ||
diff --git a/Documentation/cli-sti-removal.txt b/Documentation/cli-sti-removal.txt index 0223c9d20331..60932b02fcb3 100644 --- a/Documentation/cli-sti-removal.txt +++ b/Documentation/cli-sti-removal.txt | |||
@@ -43,7 +43,7 @@ would execute while the cli()-ed section is executing. | |||
43 | 43 | ||
44 | but from now on a more direct method of locking has to be used: | 44 | but from now on a more direct method of locking has to be used: |
45 | 45 | ||
46 | spinlock_t driver_lock = SPIN_LOCK_UNLOCKED; | 46 | DEFINE_SPINLOCK(driver_lock); |
47 | struct driver_data; | 47 | struct driver_data; |
48 | 48 | ||
49 | irq_handler (...) | 49 | irq_handler (...) |