From: Stefan Svinciak <[email protected]> Newer version is more readable and needs less changes if/when timer_struct is to be changed.
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]> --- 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 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
