From patchwork Tue Jan 29 17:59:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaroslav Kysela X-Patchwork-Id: 10786847 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C68E1399 for ; Tue, 29 Jan 2019 18:38:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56E042C9EA for ; Tue, 29 Jan 2019 18:38:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 454522C9F8; Tue, 29 Jan 2019 18:38:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F23D2C85E for ; Tue, 29 Jan 2019 18:38:53 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 30065267783; Tue, 29 Jan 2019 18:59:56 +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 13108267737; Tue, 29 Jan 2019 18:59:54 +0100 (CET) Received: from mail1.perex.cz (mail1.perex.cz [77.48.224.245]) by alsa0.perex.cz (Postfix) with ESMTP id 6F1EA2675B6 for ; Tue, 29 Jan 2019 18:59:52 +0100 (CET) Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id 4550CA0049; Tue, 29 Jan 2019 18:59:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz 4550CA0049 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1548784792; bh=SnauTXtG+AvCkkZ+rWexOO8Xa/Y0L8t2Ke6ZxO3tm78=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ry5T5QKMhyvQ2dKQKMkJ999CCEYN3CQl52TQXmOtkTAAB9pNCzbTyTIaojk03TzFw MZbl3+s/RKSMslHRn8leHU1C/ZLKRFPmK3Vp2CdMu9CbisGvdqivIrvf3yZ/Afjvk/ 614ferbwzG4Ke6dmDfQwHOWsZKO6DR6AluEBQH9Q= Received: from p50.perex-int.cz (unknown [192.168.100.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: perex) by mail1.perex.cz (Perex's E-mail Delivery System) with ESMTPSA; Tue, 29 Jan 2019 18:59:46 +0100 (CET) From: Jaroslav Kysela To: ALSA development Date: Tue, 29 Jan 2019 18:59:08 +0100 Message-Id: <20190129175909.17423-3-perex@perex.cz> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20190129175909.17423-1-perex@perex.cz> References: <20190129175909.17423-1-perex@perex.cz> Cc: Takashi Iwai , Mark Brown , Baolin Wang , Leo Yan Subject: [alsa-devel] [PATCH 2/3] ALSA: pcm: remove the file member from struct pcm 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 This member is no longer used. Signed-off-by: Jaroslav Kysela --- include/sound/pcm.h | 1 - sound/core/oss/pcm_oss.c | 1 - sound/core/pcm_native.c | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/include/sound/pcm.h b/include/sound/pcm.h index e7deb03b6702..61e4c69e73c7 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -470,7 +470,6 @@ struct snd_pcm_substream { struct snd_pcm_group self_group; /* fake group for non linked substream (with substream lock inside) */ struct snd_pcm_group *group; /* pointer to current group */ /* -- assigned files -- */ - void *file; int ref_count; atomic_t mmap_count; unsigned int f_flags; diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index b3738c228f39..222ddf9e4859 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -2427,7 +2427,6 @@ static int snd_pcm_oss_open_file(struct file *file, } pcm_oss_file->streams[idx] = substream; - substream->file = pcm_oss_file; snd_pcm_oss_init_substream(substream, &setup[idx], minor); } diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index a6d2a5024ab5..3ab6fbd7acae 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -2455,10 +2455,8 @@ static int snd_pcm_open_file(struct file *file, return -ENOMEM; } pcm_file->substream = substream; - if (substream->ref_count == 1) { - substream->file = pcm_file; + if (substream->ref_count == 1) substream->pcm_release = pcm_release_private; - } file->private_data = pcm_file; return 0;