* [PATCH] staging: visorbus, replace init_timer with setup_timer
@ 2017-02-15 16:04 Jiri Slaby
2017-02-15 17:01 ` Kershner, David A
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2017-02-15 16:04 UTC (permalink / raw)
To: david.kershner
Cc: linux-kernel, Stefan Svinciak, Jiri Slaby, Greg Kroah-Hartman,
sparmaintainer, devel
From: Stefan Svinciak <xsvinc1@fi.muni.cz>
Newer version is more readable and needs less changes if/when
timer_struct is to be changed.
Signed-off-by: Stefan Svinciak <xsvinc1@fi.muni.cz>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: David Kershner <david.kershner@unisys.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <sparmaintainer@unisys.com>
Cc: <devel@driverdev.osuosl.org>
---
drivers/staging/unisys/visorbus/visorbus_main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index aea1aa262b28..55f29ae8e015 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] staging: visorbus, replace init_timer with setup_timer
2017-02-15 16:04 [PATCH] staging: visorbus, replace init_timer with setup_timer Jiri Slaby
@ 2017-02-15 17:01 ` Kershner, David A
0 siblings, 0 replies; 2+ messages in thread
From: Kershner, David A @ 2017-02-15 17:01 UTC (permalink / raw)
To: Jiri Slaby
Cc: linux-kernel, Stefan Svinciak, Greg Kroah-Hartman,
*S-Par-Maintainer, devel
> -----Original Message-----
> From: Jiri Slaby [mailto:jslaby@suse.cz]
> Sent: Wednesday, February 15, 2017 11:04 AM
> To: Kershner, David A <David.Kershner@unisys.com>
> Cc: linux-kernel@vger.kernel.org; Stefan Svinciak <xsvinc1@fi.muni.cz>; Jiri
> Slaby <jslaby@suse.cz>; Greg Kroah-Hartman
> <gregkh@linuxfoundation.org>; *S-Par-Maintainer
> <SParMaintainer@unisys.com>; devel@driverdev.osuosl.org
> Subject: [PATCH] staging: visorbus, replace init_timer with setup_timer
>
> From: Stefan Svinciak <xsvinc1@fi.muni.cz>
>
> Newer version is more readable and needs less changes if/when
> timer_struct is to be changed.
>
> Signed-off-by: Stefan Svinciak <xsvinc1@fi.muni.cz>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: David Kershner <david.kershner@unisys.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: <sparmaintainer@unisys.com>
> Cc: <devel@driverdev.osuosl.org>
Acked-by: David Kershner <david.kershner@unisys.com>
Looks good and runs nicely on s-Par.
David Kershner
> ---
> drivers/staging/unisys/visorbus/visorbus_main.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c
> b/drivers/staging/unisys/visorbus/visorbus_main.c
> index aea1aa262b28..55f29ae8e015 100644
> --- a/drivers/staging/unisys/visorbus/visorbus_main.c
> +++ b/drivers/staging/unisys/visorbus/visorbus_main.c
> @@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-15 17:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 16:04 [PATCH] staging: visorbus, replace init_timer with setup_timer Jiri Slaby
2017-02-15 17:01 ` Kershner, David A
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.