From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752078AbdIVI1f (ORCPT ); Fri, 22 Sep 2017 04:27:35 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:37544 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751848AbdIVI1d (ORCPT ); Fri, 22 Sep 2017 04:27:33 -0400 X-Google-Smtp-Source: AOwi7QBQsOGCaAGUN3aqFnVtekgJcu9IMCgnTKhzyY2bNytBITET03ErDsp8ZHdwT1uk2x5d1Izxbg== From: Allen Pais To: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, jslaby@suse.com, Allen Pais Subject: [PATCH 10/10] drivers: tty: ifx6x60: use setup_timer() helper. Date: Fri, 22 Sep 2017 13:56:52 +0530 Message-Id: <1506068812-8496-11-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506068812-8496-1-git-send-email-allen.lkml@gmail.com> References: <1506068812-8496-1-git-send-email-allen.lkml@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/tty/serial/ifx6x60.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c index f190a84..596b738 100644 --- a/drivers/tty/serial/ifx6x60.c +++ b/drivers/tty/serial/ifx6x60.c @@ -1029,9 +1029,8 @@ static int ifx_spi_spi_probe(struct spi_device *spi) spin_lock_init(&ifx_dev->write_lock); spin_lock_init(&ifx_dev->power_lock); ifx_dev->power_status = 0; - init_timer(&ifx_dev->spi_timer); - ifx_dev->spi_timer.function = ifx_spi_timeout; - ifx_dev->spi_timer.data = (unsigned long)ifx_dev; + setup_timer(&ifx_dev->spi_timer, ifx_spi_timeout, + (unsigned long)ifx_dev); ifx_dev->modem = pl_data->modem_type; ifx_dev->use_dma = pl_data->use_dma; ifx_dev->max_hz = pl_data->max_hz; -- 2.7.4