Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp70104pxk; Fri, 11 Sep 2020 00:08:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBNvp5cHUzbC7duXpZukfQUVs3iGesPm1m3vpenCJNGmnBy1uxb5eXaQT45HQ4Ksouc11M X-Received: by 2002:aa7:c511:: with SMTP id o17mr607294edq.300.1599808081412; Fri, 11 Sep 2020 00:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599808081; cv=none; d=google.com; s=arc-20160816; b=QUrXVrj15pdWKNfDZTN/FLjePeAFXkNvjRCoSKzKa9dnvtGVDD1ZIsLA7KJCNwj0wh Aj83cNuiTfjLCKmC/xh2YfDAdpIIkeRpl+yvLYQzgILlDoS6xCnEqRfTs/s/ZRhq+pJZ sxnj8hUAm1iLMOOPJFkcoQm3KYwvusrWxVF1MdMWnZXtrqdeDIsnurs2qkxsOxdreU04 Pe9h5LW8CUaHI+E14WxGX7nLr8EkAVtSQCjZjhHGa1q/JF5qDuY9m3JN+VQiBLEjlrzz e/tbOfuGj9rd+YZFSC1Bj6Ey0EwGIUTMXon32PQXyA9snXpKKxaFRaXfz6aKyKo24Kx4 +bdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XjqzgjQOFRpWcDyxvZxk4QJoi3x7zBwCHCwHFZiUpHE=; b=n+Nj1sLsdPqbgzpc1p2c84OcH389Ftzy7uulqifcIdrzduhjnRnIPwLFM2UkBsDBX+ /d5D4TN8/Q+oiE2bL1B4WEuaTe5Va/7PGDpFsqRXlMCbMX+TC2SCr+4R0Ud+rIcKFI3r QsV3ZUeNeY3PKi55Pxft5IPUzKMwxjI18OAZMLyONRc5IW362OCqoggiXhHCbX9i7hsJ J3PwFxmQHL9UbOz3xT1m83o4lOxKP+Yx8pRxDud16KjtdAO0HMl6/ESup2oLHEm6Z5Et cA0lSzMe2DQM3oWRYCkXUaZsCSHqxfcSJxV5K9lFBBragPoerZCaSmikpwUrwccKVESM /kSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Zj9C1l8K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pv7si700526ejb.753.2020.09.11.00.07.38; Fri, 11 Sep 2020 00:08:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Zj9C1l8K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725764AbgIKHGF (ORCPT + 99 others); Fri, 11 Sep 2020 03:06:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725811AbgIKHFy (ORCPT ); Fri, 11 Sep 2020 03:05:54 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6F97C061756 for ; Fri, 11 Sep 2020 00:05:53 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id t16so8075623ilf.13 for ; Fri, 11 Sep 2020 00:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XjqzgjQOFRpWcDyxvZxk4QJoi3x7zBwCHCwHFZiUpHE=; b=Zj9C1l8KtRpl+As+fC2SodYHV3leGr8IKnqUrXtbIKaxuPg+jO46cUnNc8nVxX18SW mbEW+8P41/MJvM/E4u41uFzqENs/81i6qVqtPc1CTfNlU3EKI4I1TUEtnco1j69bnEZB wLRzlq0oAuyYLrpP3Z5qmaGoU/ISEgtJhEqpeGcisx9o3OBg19btgYSqmZJKzsuqIBqd Is69lQN28aGTCuDIiW2Zryc/kx6uTbqlcXQ9Homq6iIxjNcfkNX3gKaIihnTzR7UstAN 2VmsxeVA/wm3GsAiYpgtNStNHtBtN5TvK8oY9/xl1uIVCpI92OXTTqJMUgchu/8p+4nA i2xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XjqzgjQOFRpWcDyxvZxk4QJoi3x7zBwCHCwHFZiUpHE=; b=YwCo6z1KDQlXVFUIs19iG6Nk/RY2HxkkIcYGm5dNjuUZxJ0rJojh84NRhJ35nHRjI3 N+tDIuipcOa2FtmHzGtmmb5zNI0ZZyOw971yITn6VunzPb5CfC4J/Lwd9U++20Wd7rFx lVNM2QbHZMofMxLS5PULuwz0VpAXI4VM23EDq6XoB5VZ49NayZ9KQmMPu46rAubkSK0z RIqtApIX03vC+fdsL/lk5zvROP4PeDZPA/6kxIC7lHMW/aWxw3iBpAGwOMjoJSFIayYy dWI1yHrU7OK8XpP5N9F0mwacjt8zm7PFFGqbyqONbiErKQRMfhtQWm9tO4jRLCuVpo9M PRHQ== X-Gm-Message-State: AOAM53302YkJUHKOCq3Nt0PGy51KPjhIO/lvX/0yccFNDKyfYQWnVYyO UW13oUsYxDJEM5+KZKKd5q6iLIPIaNwFPIlJnd9BOWCQKxzl+Q== X-Received: by 2002:a92:217:: with SMTP id 23mr715365ilc.118.1599807952488; Fri, 11 Sep 2020 00:05:52 -0700 (PDT) MIME-Version: 1.0 References: <20200910052347.1790735-1-cychiang@chromium.org> <20200910052347.1790735-4-cychiang@chromium.org> In-Reply-To: <20200910052347.1790735-4-cychiang@chromium.org> From: Tzung-Bi Shih Date: Fri, 11 Sep 2020 15:05:41 +0800 Message-ID: Subject: Re: [PATCH v8 3/3] ASoC: qcom: sc7180: Add machine driver for sound card registration To: Cheng-Yi Chiang Cc: Linux Kernel Mailing List , Mark Brown , Taniya Das , Rohit kumar , Banajit Goswami , Patrick Lai , Andy Gross , Bjorn Andersson , Liam Girdwood , Rob Herring , Jaroslav Kysela , Takashi Iwai , Srini Kandagatla , Stephan Gerhold , Matthias Brugger , Heiko Stuebner , Douglas Anderson , dgreid@chromium.org, Tzung-Bi Shih , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ALSA development , linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org, Ajit Pandey Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2020 at 1:24 PM Cheng-Yi Chiang wrote: > +struct sc7180_snd_data { > + u32 pri_mi2s_clk_count; > + struct snd_soc_jack hs_jack; > + struct device_node *hs_jack_of_node; > + struct snd_soc_jack hdmi_jack; > + struct device_node *hdmi_jack_of_node; > +}; hs_jack_of_node and hdmi_jack_of_node are not using. Remove them. > +static int sc7180_init(struct snd_soc_pcm_runtime *rtd) > +{ > + struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); > + > + switch (cpu_dai->id) { > + case MI2S_PRIMARY: > + return sc7180_headset_init(rtd); > + case MI2S_SECONDARY: > + return 0; > + case HDMI: I guess this enumeration has not merged yet? It doesn't sound like a specific-enough naming. > +static int sc7180_snd_platform_probe(struct platform_device *pdev) > +{ > + struct snd_soc_card *card = &sc7180_card; > + struct sc7180_snd_data *data; > + struct device *dev = &pdev->dev; > + int ret; > + > + /* Allocate the private data */ > + data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); > + if (!data) > + return -ENOMEM; > + > + card->dev = dev; > + > + ret = qcom_snd_parse_of(card); > + if (ret) { > + dev_err(dev, "Error parsing OF data\n"); > + return ret; > + } > + > + snd_soc_card_set_drvdata(card, data); To be neat, move this line immediately before or after "card->dev = dev;".