From patchwork Wed Apr 9 10:30:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 3954031 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AA090C0DA2 for ; Wed, 9 Apr 2014 10:32:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2A8720544 for ; Wed, 9 Apr 2014 10:32:55 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 9A907201DC for ; Wed, 9 Apr 2014 10:32:52 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id F237D261A1A; Wed, 9 Apr 2014 12:32:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 41CD226087D; Wed, 9 Apr 2014 12:32:41 +0200 (CEST) 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 9782B2608E8; Wed, 9 Apr 2014 12:32:40 +0200 (CEST) Received: from mail-bk0-f45.google.com (mail-bk0-f45.google.com [209.85.214.45]) by alsa0.perex.cz (Postfix) with ESMTP id 35702261693 for ; Wed, 9 Apr 2014 12:31:51 +0200 (CEST) Received: by mail-bk0-f45.google.com with SMTP id na10so2182644bkb.4 for ; Wed, 09 Apr 2014 03:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=tFQPUYQd6AS9OjdGwDsrQrEdTnwIHOuXwe9+kKtu5VE=; b=PC8wbSwlrJVM73xiqfn+zEWQmUc6rg+byNYuMwb/i3mR8e4wR0a9qahPeBgNcvEKCn VJSuZbzC7NokECRCzhuhWAMbA1+fvG/odX29ZBuaVofj8TEZ2N4MRWtEDZeKavf/jjff iqmv1PZ0CL7efIFleJBhdXNW3a7v3yqyeHKfULkTUkDfhGefUGCuu0wPyzoFmY1cx4ph RH+wx3s+VSI9ZzrboelUHIRxTpoB1pKqsqV7mjBv7qwhAHzrr9V0r8mr6Itc0KfZ6r6S gqwiazVsUfWzpHRkg0RmrdA86BhmidgMChXeKWRlZo6VvOW2oH/yZ87c1X5XtO6ICXzo jQZg== X-Received: by 10.204.72.9 with SMTP id k9mr8082928bkj.1.1397039510935; Wed, 09 Apr 2014 03:31:50 -0700 (PDT) Received: from localhost (port-93174.pppoe.wtnet.de. [84.46.76.115]) by mx.google.com with ESMTPSA id m4sm1673609bkj.4.2014.04.09.03.31.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Apr 2014 03:31:50 -0700 (PDT) From: Thierry Reding To: Takashi Iwai , Jaroslav Kysela Date: Wed, 9 Apr 2014 12:30:57 +0200 Message-Id: <1397039457-9461-1-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH] ALSA: hda - Make full_reset boolean 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 From: Thierry Reding The full_reset argument to azx_init_chip() carries boolean rather than numerical information, so update the type to reflect that. Signed-off-by: Thierry Reding --- Changes in v2: - update prototype in hda_controller.h sound/pci/hda/hda_controller.c | 8 ++++---- sound/pci/hda/hda_controller.h | 2 +- sound/pci/hda/hda_intel.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c index 97993e17f46a..98d31d153703 100644 --- a/sound/pci/hda/hda_controller.c +++ b/sound/pci/hda/hda_controller.c @@ -1604,7 +1604,7 @@ static void azx_exit_link_reset(struct azx *chip) } /* reset codec link */ -static int azx_reset(struct azx *chip, int full_reset) +static int azx_reset(struct azx *chip, bool full_reset) { if (!full_reset) goto __skip; @@ -1701,7 +1701,7 @@ static void azx_int_clear(struct azx *chip) /* * reset and start the controller registers */ -void azx_init_chip(struct azx *chip, int full_reset) +void azx_init_chip(struct azx *chip, bool full_reset) { if (chip->initialized) return; @@ -1841,7 +1841,7 @@ static void azx_bus_reset(struct hda_bus *bus) bus->in_reset = 1; azx_stop_chip(chip); - azx_init_chip(chip, 1); + azx_init_chip(chip, true); #ifdef CONFIG_PM if (chip->initialized) { struct azx_pcm *p; @@ -1948,7 +1948,7 @@ int azx_codec_create(struct azx *chip, const char *model, * get back to the sanity state. */ azx_stop_chip(chip); - azx_init_chip(chip, 1); + azx_init_chip(chip, true); } } } diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h index 1d2e3be2bae6..baf0e77330af 100644 --- a/sound/pci/hda/hda_controller.h +++ b/sound/pci/hda/hda_controller.h @@ -37,7 +37,7 @@ int azx_alloc_stream_pages(struct azx *chip); void azx_free_stream_pages(struct azx *chip); /* Low level azx interface */ -void azx_init_chip(struct azx *chip, int full_reset); +void azx_init_chip(struct azx *chip, bool full_reset); void azx_stop_chip(struct azx *chip); void azx_enter_link_reset(struct azx *chip); irqreturn_t azx_interrupt(int irq, void *dev_id); diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 77ca894f8284..d6bca62ef387 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -636,7 +636,7 @@ static int azx_resume(struct device *dev) return -EIO; azx_init_pci(chip); - azx_init_chip(chip, 1); + azx_init_chip(chip, true); snd_hda_resume(chip->bus); snd_power_change_state(card, SNDRV_CTL_POWER_D0); @@ -689,7 +689,7 @@ static int azx_runtime_resume(struct device *dev) status = azx_readw(chip, STATESTS); azx_init_pci(chip); - azx_init_chip(chip, 1); + azx_init_chip(chip, true); bus = chip->bus; if (status && bus) {