lkml.org 
[lkml]   [2017]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] ipmi_ssif: use setup_timer
From
Date
A little nicer, yes.  In queue for the next release.

Thanks,

-corey

On 03/24/2017 09:15 AM, Geliang Tang wrote:
> Use setup_timer() instead of init_timer() to simplify the code.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> ---
> drivers/char/ipmi/ipmi_ssif.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
> index cca6e5b..a92a049 100644
> --- a/drivers/char/ipmi/ipmi_ssif.c
> +++ b/drivers/char/ipmi/ipmi_ssif.c
> @@ -1642,9 +1642,8 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
>
> spin_lock_init(&ssif_info->lock);
> ssif_info->ssif_state = SSIF_NORMAL;
> - init_timer(&ssif_info->retry_timer);
> - ssif_info->retry_timer.data = (unsigned long) ssif_info;
> - ssif_info->retry_timer.function = retry_timeout;
> + setup_timer(&ssif_info->retry_timer, retry_timeout,
> + (unsigned long)ssif_info);
>
> for (i = 0; i < SSIF_NUM_STATS; i++)
> atomic_set(&ssif_info->stats[i], 0);


\
 
 \ /
  Last update: 2017-03-25 04:00    [W:0.068 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site