From patchwork Sun Jan 11 14:24:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5606221 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9FE1C9F443 for ; Sun, 11 Jan 2015 14:21:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE1FB2063F for ; Sun, 11 Jan 2015 14:21:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 76D442062D for ; Sun, 11 Jan 2015 14:21:14 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 056E42605EC; Sun, 11 Jan 2015 15:21:13 +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 7AAAB2604EF; Sun, 11 Jan 2015 15:21: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 83EC72604F4; Sun, 11 Jan 2015 15:21:03 +0100 (CET) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by alsa0.perex.cz (Postfix) with ESMTP id 963D42604ED for ; Sun, 11 Jan 2015 15:20:56 +0100 (CET) Received: by mail-wi0-f173.google.com with SMTP id r20so10069064wiv.0 for ; Sun, 11 Jan 2015 06:20:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8AX33+sSJiPIh3gxoz/RQS5T1t51juFjz0XrLljuieU=; b=MWdi1s79obW/vncMXVjEZZN6H5wS7DKS7mvdM79OjSDxT441a6gkR93mDbn8ddVLnk 0LJNk8X9QzEk2qw5uAmE3yG8wVb+kGaHS1wZpEfBELmNmbdPbJVQVn6V+zRV8oJD8a1t E+02oPuo/o9aNXJvjz4JRFOPDvwDB2npPMYkMns5gL5IKy7LuMWddOXRI1ZaQFyJB2yV Ecrmr/DzwNfGWNJM4ePU2s+LzSLKKNIfHUXlSkhNR6Ami5rmQB8SkBMDDU9OAcAVviKH tiFridIYA91VY5tH6aqIh+Xkt3aTWnSPH2FCbObYRcg2ZSF4gg9tOZgHlMDTBl/fsSzC fXcg== X-Gm-Message-State: ALoCoQmKSphdhHg+DVjc5JmgGWQ3Q23wQMT0ub9cpIV7EwgpJhisEIgPlAceY0NgTvHxzrJW3t3h X-Received: by 10.180.84.134 with SMTP id z6mr22305638wiy.50.1420986056179; Sun, 11 Jan 2015 06:20:56 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id x16sm6307434wia.15.2015.01.11.06.20.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jan 2015 06:20:55 -0800 (PST) From: Rickard Strandqvist To: Jaroslav Kysela , Takashi Iwai Date: Sun, 11 Jan 2015 15:24:02 +0100 Message-Id: <1420986242-18502-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Rickard Strandqvist Subject: [alsa-devel] [PATCH] ALSA: lola: lola_mixer: Remove some unused functions 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 Removes some functions that are not used anywhere: lola_restore_mixer() lola_save_mixer() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- sound/pci/lola/lola.h | 2 -- sound/pci/lola/lola_mixer.c | 43 ------------------------------------------- 2 files changed, 45 deletions(-) diff --git a/sound/pci/lola/lola.h b/sound/pci/lola/lola.h index f0b1000..9125916 100644 --- a/sound/pci/lola/lola.h +++ b/sound/pci/lola/lola.h @@ -513,8 +513,6 @@ int lola_init_mixer_widget(struct lola *chip, int nid); void lola_free_mixer(struct lola *chip); int lola_create_mixer(struct lola *chip); int lola_setup_all_analog_gains(struct lola *chip, int dir, bool mute); -void lola_save_mixer(struct lola *chip); -void lola_restore_mixer(struct lola *chip); int lola_set_src_config(struct lola *chip, unsigned int src_mask, bool update); /* proc */ diff --git a/sound/pci/lola/lola_mixer.c b/sound/pci/lola/lola_mixer.c index 782f4d8..47ac93a 100644 --- a/sound/pci/lola/lola_mixer.c +++ b/sound/pci/lola/lola_mixer.c @@ -348,49 +348,6 @@ int lola_setup_all_analog_gains(struct lola *chip, int dir, bool mute) return lola_codec_flush(chip); } -void lola_save_mixer(struct lola *chip) -{ - /* mute analog output */ - if (chip->mixer.array_saved) { - /* store contents of mixer array */ - memcpy_fromio(chip->mixer.array_saved, chip->mixer.array, - sizeof(*chip->mixer.array)); - } - lola_setup_all_analog_gains(chip, PLAY, true); /* output mute */ -} - -void lola_restore_mixer(struct lola *chip) -{ - int i; - - /*lola_reset_setups(chip);*/ - if (chip->mixer.array_saved) { - /* restore contents of mixer array */ - memcpy_toio(chip->mixer.array, chip->mixer.array_saved, - sizeof(*chip->mixer.array)); - /* inform micro-controller about all restored values - * and ignore return values - */ - for (i = 0; i < chip->mixer.src_phys_ins; i++) - lola_codec_write(chip, chip->mixer.nid, - LOLA_VERB_SET_SOURCE_GAIN, - i, 0); - for (i = 0; i < chip->mixer.src_stream_outs; i++) - lola_codec_write(chip, chip->mixer.nid, - LOLA_VERB_SET_SOURCE_GAIN, - chip->mixer.src_stream_out_ofs + i, 0); - for (i = 0; i < chip->mixer.dest_stream_ins; i++) - lola_codec_write(chip, chip->mixer.nid, - LOLA_VERB_SET_DESTINATION_GAIN, - i, 0); - for (i = 0; i < chip->mixer.dest_phys_outs; i++) - lola_codec_write(chip, chip->mixer.nid, - LOLA_VERB_SET_DESTINATION_GAIN, - chip->mixer.dest_phys_out_ofs + i, 0); - lola_codec_flush(chip); - } -} - /* */