From patchwork Fri Jul 8 01:54:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Zhang X-Patchwork-Id: 9219967 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EA6EA60574 for ; Fri, 8 Jul 2016 01:55:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEBB7272AA for ; Fri, 8 Jul 2016 01:55:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C229E2756B; Fri, 8 Jul 2016 01:55:37 +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=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no 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 EA142272AA for ; Fri, 8 Jul 2016 01:55:36 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 517B52664B2; Fri, 8 Jul 2016 03:55:35 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CB199265344; Fri, 8 Jul 2016 03:55:26 +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 A47BF26545F; Fri, 8 Jul 2016 03:55:25 +0200 (CEST) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by alsa0.perex.cz (Postfix) with ESMTP id 602FA261561 for ; Fri, 8 Jul 2016 03:55:20 +0200 (CEST) Received: by mail-pa0-f46.google.com with SMTP id b13so10861163pat.0 for ; Thu, 07 Jul 2016 18:55:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=CVUq8oPOiweSO9CP/o+TSEO5cDpV9Vnjh0fkXxx0T/g=; b=NMMilcOZMrWJ9ZWxTCg+HjksSJi42AuewVJpBHdnQKqM/i3V+Fw02ySfantpKFKbnD uc8psXfzhywRgQv3NV/Ac09ZmDNzjQoT/nf/Sjc6qpt8EO51nnyBsOPn1TDmrhfnrfur sUp40X7zA0BDRehq2MQ3YM/P3Rjxq8qrS/4xA= 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=CVUq8oPOiweSO9CP/o+TSEO5cDpV9Vnjh0fkXxx0T/g=; b=VNXo3B59j+a2bmY8XJSzyStt+Gsfx7nvKv6k44YqQ0RdTLVoIoRKG9qEVu63xDSPFq LCX1zCKJHcL5r82Ri/QWzzQEI6dC2jKhQMQw8PxzG5rH0pqx2g7SB2v6F/++9NduhdzP tzzPOTwc2ZmdfR1z9fAC4ls4IU4UhR7oEO4+SyzCYqhSYXob57Dlhxd1+ofIxCspaMzw aKoz66NbPaHDAUNyNgSiuPXL9HZ55MS0/ajKH9SWHTOLzMeaFs/FLbusQHgIzCJ01zp4 fB718wbGu5IeveJEwC2Gt67U2YoMZ9IdRp01GGi0wzY1PLN7NsA9PgzpNuy0/qrFe898 Q+RQ== X-Gm-Message-State: ALyK8tJe/cdyp2by9Xw3t0J5NJaxZ80oMGI3S3W+WM6qzuwTntZnZh8vJpQA1fK1R7cMlryg X-Received: by 10.66.85.197 with SMTP id j5mr5576078paz.87.1467942918954; Thu, 07 Jul 2016 18:55:18 -0700 (PDT) Received: from benzh.mtv.corp.google.com ([172.22.65.67]) by smtp.gmail.com with ESMTPSA id f138sm29983pfa.17.2016.07.07.18.55.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jul 2016 18:55:18 -0700 (PDT) From: Ben Zhang To: Mark Brown Date: Thu, 7 Jul 2016 18:54:56 -0700 Message-Id: <1467942896-40785-1-git-send-email-benzh@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 Cc: Ben Zhang , alsa-devel@alsa-project.org, Dylan Reid , Jie Yang , Liam Girdwood Subject: [alsa-devel] [PATCH] ASoC: Intel: Fix conflicting pcm dev drvdata on haswell 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 soc-core sets the snd_soc_pcm_runtime->dev drvdata to snd_soc_pcm_runtime in soc_post_component_init, and access it in places like codec_reg_show. hsw_pcm_open overwrites the drvdata to point to hsw_pcm_data, confusing soc-core, and causing crashes when cat /sys/devices/pci0000:00/INT3438:00/.../System PCM/codec_reg This patch removes the set in hsw_pcm_open since it's no longer used. commit 7ff9d6714a5c ("ASoC: Intel: Split hsw_pcm_data for playback and capture") already removed all calls to snd_soc_pcm_get_drvdata(rtd). Signed-off-by: Ben Zhang --- sound/soc/intel/haswell/sst-haswell-pcm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/intel/haswell/sst-haswell-pcm.c b/sound/soc/intel/haswell/sst-haswell-pcm.c index 994256b..3154525 100644 --- a/sound/soc/intel/haswell/sst-haswell-pcm.c +++ b/sound/soc/intel/haswell/sst-haswell-pcm.c @@ -819,7 +819,6 @@ static int hsw_pcm_open(struct snd_pcm_substream *substream) mutex_lock(&pcm_data->mutex); pm_runtime_get_sync(pdata->dev); - snd_soc_pcm_set_drvdata(rtd, pcm_data); pcm_data->substream = substream; snd_soc_set_runtime_hwparams(substream, &hsw_pcm_hardware);