diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-12 09:13:49 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-11-22 02:57:09 +0300 |
commit | 7eeb6b893bd28c68b6d664de1d3120e49b855cdb (patch) | |
tree | 47dfd9096c2f8018fd2bf3ef6ad4cb35378ec69e /Documentation/core-api/local_ops.rst | |
parent | 86cb30ec07cdc78ad94d94bb3756c7c2d46968b9 (diff) | |
download | linux-7eeb6b893bd28c68b6d664de1d3120e49b855cdb.tar.xz |
timer: Remove init_timer() interface
All users of init_timer() have been updated. Remove the ancient interface.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'Documentation/core-api/local_ops.rst')
-rw-r--r-- | Documentation/core-api/local_ops.rst | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Documentation/core-api/local_ops.rst b/Documentation/core-api/local_ops.rst index 1062ddba62c7..2ac3f9f29845 100644 --- a/Documentation/core-api/local_ops.rst +++ b/Documentation/core-api/local_ops.rst @@ -177,18 +177,14 @@ Here is a sample module which implements a basic per cpu counter using printk("Read : CPU %d, count %ld\n", cpu, local_read(&per_cpu(counters, cpu))); } - del_timer(&test_timer); - test_timer.expires = jiffies + 1000; - add_timer(&test_timer); + mod_timer(&test_timer, jiffies + 1000); } static int __init test_init(void) { /* initialize the timer that will increment the counter */ - init_timer(&test_timer); - test_timer.function = do_test_timer; - test_timer.expires = jiffies + 1; - add_timer(&test_timer); + timer_setup(&test_timer, do_test_timer, 0); + mod_timer(&test_timer, jiffies + 1); return 0; } |