[PATCH] Char: timers cleanup
- Use timer macros to set function and data members and to modify expiration time. - Use DEFINE_TIMER for global timers and do not init them at run-time in these cases. - del_timer_sync is common in most cases -- we want to wait for timer function if it's still running. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Dave Airlie <airlied@linux.ie> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Paul Fulghum <paulkf@microgate.com> Cc: Kylene Jo Hall <kjhall@us.ibm.com> Cc: Wim Van Sebroeck <wim@iguana.be> Acked-by: Dmitry Torokhov <dtor@mail.ru> (Input bits) Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
d096f3e989
commit
40565f1962
@@ -1107,9 +1107,8 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, const struct tpm_vend
|
||||
|
||||
INIT_WORK(&chip->work, timeout_work);
|
||||
|
||||
init_timer(&chip->user_read_timer);
|
||||
chip->user_read_timer.function = user_reader_timeout;
|
||||
chip->user_read_timer.data = (unsigned long) chip;
|
||||
setup_timer(&chip->user_read_timer, user_reader_timeout,
|
||||
(unsigned long)chip);
|
||||
|
||||
memcpy(&chip->vendor, entry, sizeof(struct tpm_vendor_specific));
|
||||
|
||||
|
Reference in New Issue
Block a user