diff options
author | Javier Martinez Canillas <javier@dowhile0.org> | 2018-02-25 14:41:48 +0100 |
---|---|---|
committer | Javier Martinez Canillas <javier@dowhile0.org> | 2018-02-25 14:43:09 +0100 |
commit | c400d261b75b51eed26bd851e4458c4f6eda8eff (patch) | |
tree | e74c4c605b69b551d1feb738773c1601b7303dd8 | |
parent | 4da127109451ff67690083346f49f9a8e2c4f306 (diff) | |
download | ldd3-c400d261b75b51eed26bd851e4458c4f6eda8eff.tar.gz |
shortprint: Replace init_timer with timer_setup
The init_timer() function doesn't exist anymore, use the timer_setup()
function instead.
Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
-rw-r--r-- | shortprint/shortprint.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/shortprint/shortprint.c b/shortprint/shortprint.c index edce844..bafc0e8 100644 --- a/shortprint/shortprint.c +++ b/shortprint/shortprint.c @@ -69,7 +69,7 @@ MODULE_LICENSE("Dual BSD/GPL"); * Forwards. */ static void shortp_cleanup(void); -static void shortp_timeout(unsigned long unused); +static void shortp_timeout(struct timer_list *unused); /* * Input is managed through a simple circular buffer which, among other things, @@ -376,7 +376,7 @@ static irqreturn_t shortp_interrupt(int irq, void *dev_id) * things have gone wrong, however; printers can spend an awful long time * just thinking about things. */ -static void shortp_timeout(unsigned long unused) +static void shortp_timeout(struct timer_list *unused) { unsigned long flags; unsigned char status; @@ -461,9 +461,7 @@ static int shortp_init(void) /* And the output info */ shortp_output_active = 0; spin_lock_init(&shortp_out_lock); - init_timer(&shortp_timer); - shortp_timer.function = shortp_timeout; - shortp_timer.data = 0; + timer_setup(&shortp_timer, shortp_timeout, 0); /* Set up our workqueue. */ shortp_workqueue = create_singlethread_workqueue("shortprint"); |