diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/slow-work.txt | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Documentation/slow-work.txt b/Documentation/slow-work.txt index ebc50f808ea4..f12fda31dcdc 100644 --- a/Documentation/slow-work.txt +++ b/Documentation/slow-work.txt | |||
@@ -64,9 +64,11 @@ USING SLOW WORK ITEMS | |||
64 | Firstly, a module or subsystem wanting to make use of slow work items must | 64 | Firstly, a module or subsystem wanting to make use of slow work items must |
65 | register its interest: | 65 | register its interest: |
66 | 66 | ||
67 | int ret = slow_work_register_user(); | 67 | int ret = slow_work_register_user(struct module *module); |
68 | 68 | ||
69 | This will return 0 if successful, or a -ve error upon failure. | 69 | This will return 0 if successful, or a -ve error upon failure. The module |
70 | pointer should be the module interested in using this facility (almost | ||
71 | certainly THIS_MODULE). | ||
70 | 72 | ||
71 | 73 | ||
72 | Slow work items may then be set up by: | 74 | Slow work items may then be set up by: |
@@ -110,7 +112,12 @@ operation. When all a module's slow work items have been processed, and the | |||
110 | module has no further interest in the facility, it should unregister its | 112 | module has no further interest in the facility, it should unregister its |
111 | interest: | 113 | interest: |
112 | 114 | ||
113 | slow_work_unregister_user(); | 115 | slow_work_unregister_user(struct module *module); |
116 | |||
117 | The module pointer is used to wait for all outstanding work items for that | ||
118 | module before completing the unregistration. This prevents the put_ref() code | ||
119 | from being taken away before it completes. module should almost certainly be | ||
120 | THIS_MODULE. | ||
114 | 121 | ||
115 | 122 | ||
116 | =============== | 123 | =============== |