From patchwork Mon Feb 16 23:05:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Knoth X-Patchwork-Id: 5834921 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 41CC89F30C for ; Mon, 16 Feb 2015 23:07:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 61758200E6 for ; Mon, 16 Feb 2015 23:07:26 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id F38692021F for ; Mon, 16 Feb 2015 23:07:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 12D032614CE; Tue, 17 Feb 2015 00:07:24 +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 9CCF626109C; Tue, 17 Feb 2015 00:06:16 +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 2A916260A56; Tue, 17 Feb 2015 00:06:15 +0100 (CET) Received: from ltw.loris.tv (ltw.loris.tv [188.40.101.23]) by alsa0.perex.cz (Postfix) with ESMTP id 9BFA4260711; Tue, 17 Feb 2015 00:05:45 +0100 (CET) Received: from localhost (ltw.loris.tv [127.0.0.1]) by ltw.loris.tv (Postfix) with ESMTP id 74A5F61BAB; Tue, 17 Feb 2015 00:05:45 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.7.1 (20120429) (Debian) at ltw.loris.tv Received: from ltw.loris.tv ([127.0.0.1]) by localhost (ltw.loris.tv [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 3CiYe7-1SMdP; Tue, 17 Feb 2015 00:05:30 +0100 (CET) Received: by ltw.loris.tv (Postfix, from userid 1000) id 44C1561C81; Tue, 17 Feb 2015 00:05:30 +0100 (CET) From: Adrian Knoth To: patch@alsa-project.org Date: Tue, 17 Feb 2015 00:05:06 +0100 Message-Id: <1424127906-7530-4-git-send-email-adi@drcomp.erfurt.thur.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1424127906-7530-1-git-send-email-adi@drcomp.erfurt.thur.de> References: <1424127906-7530-1-git-send-email-adi@drcomp.erfurt.thur.de> Cc: adi@drcomp.erfurt.thur.de, alsa-devel@alsa-project.org, Adrian Knoth Subject: [alsa-devel] [PATCH 3/3] ALSA: hdspm - DRY cleanup of snd_pcm_ops 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: Adrian Knoth This commit removes code duplication between snd_hdspm_{capture,playback}_ops. No semantic changes intended, this is purely cosmetic. Signed-off-by: Adrian Knoth diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 4e1cfb9..cb666c7 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -6354,19 +6354,7 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, return 0; } -static struct snd_pcm_ops snd_hdspm_playback_ops = { - .open = snd_hdspm_open, - .close = snd_hdspm_release, - .ioctl = snd_hdspm_ioctl, - .hw_params = snd_hdspm_hw_params, - .hw_free = snd_hdspm_hw_free, - .prepare = snd_hdspm_prepare, - .trigger = snd_hdspm_trigger, - .pointer = snd_hdspm_hw_pointer, - .page = snd_pcm_sgbuf_ops_page, -}; - -static struct snd_pcm_ops snd_hdspm_capture_ops = { +static struct snd_pcm_ops snd_hdspm_ops = { .open = snd_hdspm_open, .close = snd_hdspm_release, .ioctl = snd_hdspm_ioctl, @@ -6462,9 +6450,9 @@ static int snd_hdspm_create_pcm(struct snd_card *card, strcpy(pcm->name, hdspm->card_name); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, - &snd_hdspm_playback_ops); + &snd_hdspm_ops); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, - &snd_hdspm_capture_ops); + &snd_hdspm_ops); pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX;