staging: visorbus, replace init_timer with setup_timer
PATCH 1/1 staging: visorbus, replace init_timer with setup_timer
From: Stefan Svinciak <[email protected]>
Newer version is more readable and needs less changes if/when timer_struct is to be changed.
--- drivers/staging/unisys/visorbus/visorbus_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/unisys/visorbus/visorbus_main.c +1 -3
@@ -623,9 +623,7 @@ create_visor_device(struct visor_device *dev) dev->device.release = visorbus_release_device;/* keep a reference just for us (now 2) */ get_device (&dev->device); -init_timer (&dev->timer); - dev->timer.data = (unsigned long )(dev); - dev->timer.function = dev_periodic_work; +setup_timer (&dev->timer, dev_periodic_work, (unsigned long )dev);/* * bus_id must be a unique name with respect to this bus TYPE
Signature · 1 line
2.11.1
Quoted 15 lines
-----Original Message-----
From: Jiri Slaby [mailto:[email protected]]
Sent: Wednesday, February 15, 2017 11:04 AM
To: Kershner, David A <[email protected]>
Cc: [email protected]; Stefan Svinciak <[email protected]>; Jiri Slaby <[email protected]>; Greg Kroah-Hartman <[email protected]>; *S-Par-Maintainer <[email protected]>; [email protected]
Subject: [PATCH] staging: visorbus, replaceinit_timerwithsetup_timerFrom: Stefan Svinciak <[email protected]>
Newer version is more readable and needs less changes if/when
timer_structis to be changed.
Quoted 6 lines
Signed-off-by Stefan Svinciak <[email protected]>Signed-off-by Jiri Slaby <[email protected]>Cc David Kershner <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc <[email protected]>Cc <[email protected]>
Looks good and runs nicely on s-Par.
David Kershner
Quoted 22 lines
--- drivers/staging/unisys/visorbus/visorbus_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/unisys/visorbus/visorbus_main.c +1
-4@@ -623,9 +623,7 @@ create_visor_device(struct visor_device *dev) dev->device.release = visorbus_release_device;/* keep a reference just for us (now 2) */ get_device (&dev->device); -init_timer (&dev->timer); - dev->timer.data = (unsigned long )(dev); - dev->timer.function = dev_periodic_work; +setup_timer (&dev->timer, dev_periodic_work, (unsigned long )dev);/* * bus_id must be a unique name with respect to this bus TYPE -- 2.11.1