From patchwork Mon Jan 19 11:11:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 5657521 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1A3F1C058D for ; Mon, 19 Jan 2015 11:18:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6885B2020E for ; Mon, 19 Jan 2015 11:18:38 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4361A201C0 for ; Mon, 19 Jan 2015 11:18:37 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 74BFE265703; Mon, 19 Jan 2015 12:18:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 46E052606FC; Mon, 19 Jan 2015 12:12:04 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 29E7B2606FA; Mon, 19 Jan 2015 12:11:57 +0100 (CET) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 44C412606ED for ; Mon, 19 Jan 2015 12:11:37 +0100 (CET) Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 04A16ADA0 for ; Mon, 19 Jan 2015 11:11:36 +0000 (UTC) From: Takashi Iwai To: alsa-devel@alsa-project.org Date: Mon, 19 Jan 2015 12:11:28 +0100 Message-Id: <1421665891-14475-16-git-send-email-tiwai@suse.de> X-Mailer: git-send-email 2.2.1 In-Reply-To: <1421665891-14475-1-git-send-email-tiwai@suse.de> References: <1421665891-14475-1-git-send-email-tiwai@suse.de> Subject: [alsa-devel] [PATCH 15/18] ALSA: aica: Use setup_timer() and mod_timer() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai --- sound/sh/aica.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sound/sh/aica.c b/sound/sh/aica.c index f44dda610ed2..8212300088fc 100644 --- a/sound/sh/aica.c +++ b/sound/sh/aica.c @@ -343,11 +343,9 @@ static void spu_begin_dma(struct snd_pcm_substream *substream) mod_timer(&dreamcastcard->timer, jiffies + 4); return; } - init_timer(&(dreamcastcard->timer)); - dreamcastcard->timer.data = (unsigned long) substream; - dreamcastcard->timer.function = aica_period_elapsed; - dreamcastcard->timer.expires = jiffies + 4; - add_timer(&(dreamcastcard->timer)); + setup_timer(&dreamcastcard->timer, aica_period_elapsed, + (unsigned long) substream); + mod_timer(&dreamcastcard->timer, jiffies + 4); } static int snd_aicapcm_pcm_open(struct snd_pcm_substream