diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 19:36:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 19:36:46 -0400 |
commit | e9b62693ae0a1e13ccc97a6792d9a7770c8d1b5b (patch) | |
tree | c676609730533fc1b7c5e01992e46b6eaf75f99b /Documentation/DocBook | |
parent | 548453fd107f789f5f1bc2dc13cc432ceb3b5efd (diff) | |
parent | 838cb6aba4cebcf4fcd06b90e2adf890bef884ac (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/juhl/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/juhl/trivial: (24 commits)
DOC: A couple corrections and clarifications in USB doc.
Generate a slightly more informative error msg for bad HZ
fix typo "is" -> "if" in Makefile
ext*: spelling fix prefered -> preferred
DOCUMENTATION: Use newer DEFINE_SPINLOCK macro in docs.
KEYS: Fix the comment to match the file name in rxrpc-type.h.
RAID: remove trailing space from printk line
DMA engine: typo fixes
Remove unused MAX_NODES_SHIFT
MAINTAINERS: Clarify access to OCFS2 development mailing list.
V4L: Storage class should be before const qualifier (sn9c102)
V4L: Storage class should be before const qualifier
sonypi: Storage class should be before const qualifier
intel_menlow: Storage class should be before const qualifier
DVB: Storage class should be before const qualifier
arm: Storage class should be before const qualifier
ALSA: Storage class should be before const qualifier
acpi: Storage class should be before const qualifier
firmware_sample_driver.c: fix coding style
MAINTAINERS: Add ati_remote2 driver
...
Fixed up trivial conflicts in firmware_sample_driver.c
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r-- | Documentation/DocBook/kernel-locking.tmpl | 4 | ||||
-rw-r--r-- | Documentation/DocBook/writing_usb_driver.tmpl | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl index 435413ca40dc..77c42f40be5d 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/DocBook/writing_usb_driver.tmpl b/Documentation/DocBook/writing_usb_driver.tmpl index d4188d4ff535..eeff19ca831b 100644 --- a/Documentation/DocBook/writing_usb_driver.tmpl +++ b/Documentation/DocBook/writing_usb_driver.tmpl | |||
@@ -100,8 +100,8 @@ | |||
100 | useful documents, at the USB home page (see Resources). An excellent | 100 | useful documents, at the USB home page (see Resources). An excellent |
101 | introduction to the Linux USB subsystem can be found at the USB Working | 101 | introduction to the Linux USB subsystem can be found at the USB Working |
102 | Devices List (see Resources). It explains how the Linux USB subsystem is | 102 | Devices List (see Resources). It explains how the Linux USB subsystem is |
103 | structured and introduces the reader to the concept of USB urbs, which | 103 | structured and introduces the reader to the concept of USB urbs |
104 | are essential to USB drivers. | 104 | (USB Request Blocks), which are essential to USB drivers. |
105 | </para> | 105 | </para> |
106 | <para> | 106 | <para> |
107 | The first thing a Linux USB driver needs to do is register itself with | 107 | The first thing a Linux USB driver needs to do is register itself with |
@@ -162,8 +162,8 @@ static int __init usb_skel_init(void) | |||
162 | module_init(usb_skel_init); | 162 | module_init(usb_skel_init); |
163 | </programlisting> | 163 | </programlisting> |
164 | <para> | 164 | <para> |
165 | When the driver is unloaded from the system, it needs to unregister | 165 | When the driver is unloaded from the system, it needs to deregister |
166 | itself with the USB subsystem. This is done with the usb_unregister | 166 | itself with the USB subsystem. This is done with the usb_deregister |
167 | function: | 167 | function: |
168 | </para> | 168 | </para> |
169 | <programlisting> | 169 | <programlisting> |
@@ -232,7 +232,7 @@ static int skel_probe(struct usb_interface *interface, | |||
232 | were passed to the USB subsystem will be called from a user program trying | 232 | were passed to the USB subsystem will be called from a user program trying |
233 | to talk to the device. The first function called will be open, as the | 233 | to talk to the device. The first function called will be open, as the |
234 | program tries to open the device for I/O. We increment our private usage | 234 | program tries to open the device for I/O. We increment our private usage |
235 | count and save off a pointer to our internal structure in the file | 235 | count and save a pointer to our internal structure in the file |
236 | structure. This is done so that future calls to file operations will | 236 | structure. This is done so that future calls to file operations will |
237 | enable the driver to determine which device the user is addressing. All | 237 | enable the driver to determine which device the user is addressing. All |
238 | of this is done with the following code: | 238 | of this is done with the following code: |
@@ -252,8 +252,8 @@ file->private_data = dev; | |||
252 | send to the device based on the size of the write urb it has created (this | 252 | send to the device based on the size of the write urb it has created (this |
253 | size depends on the size of the bulk out end point that the device has). | 253 | size depends on the size of the bulk out end point that the device has). |
254 | Then it copies the data from user space to kernel space, points the urb to | 254 | Then it copies the data from user space to kernel space, points the urb to |
255 | the data and submits the urb to the USB subsystem. This can be shown in | 255 | the data and submits the urb to the USB subsystem. This can be seen in |
256 | he following code: | 256 | the following code: |
257 | </para> | 257 | </para> |
258 | <programlisting> | 258 | <programlisting> |
259 | /* we can only write as much as 1 urb will hold */ | 259 | /* we can only write as much as 1 urb will hold */ |