From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753356AbbC0BQk (ORCPT ); Thu, 26 Mar 2015 21:16:40 -0400 Received: from regular1.263xmail.com ([211.150.99.131]:43734 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752940AbbC0BQi (ORCPT ); Thu, 26 Mar 2015 21:16:38 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: ykk@rock-chips.com X-FST-TO: broonie@kernel.org X-SENDER-IP: 58.211.221.234 X-LOGIN-NAME: ykk@rock-chips.com X-UNIQUE-TAG: <05c930ff4bfb82f07cc57eae9d7bf1aa> X-DNS-TYPE: 0 Message-ID: <5514AF61.2050909@rock-chips.com> Date: Fri, 27 Mar 2015 09:16:17 +0800 From: yakir User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Mark Brown CC: Liam Girdwood , djkurtz@chromium.org, dianders@chromium.org, linux-rockchip@lists.infradead.org, David Airlie , Philipp Zabel , Russell King , Andy Yan , Greg Kroah-Hartman , Fabio Estevam , dri-devel@lists.freedesktop.org, Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , Brian Austin , Bard Liao , Oder Chiou , Max Filippov , Axel Lin , Arnd Bergmann , Jyri Sarha , Sean Cross , Ben Zhang , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, mmind00@googlemail.com, marcheu@chromium.org, mark.yao@rock-chips.com Subject: Re: [PATCH v4 14/15] ASoC: rockchip/rockchip-hdmi-audio: add sound driver for hdmi audio References: <1425175834-24661-1-git-send-email-ykk@rock-chips.com> <1425179070-2736-1-git-send-email-ykk@rock-chips.com> <20150326181620.GZ3572@sirena.org.uk> In-Reply-To: <20150326181620.GZ3572@sirena.org.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, On 2015年03月27日 02:16, Mark Brown wrote: > On Sat, Feb 28, 2015 at 10:04:30PM -0500, Yakir Yang wrote: > >> + ret = snd_soc_dai_set_fmt(cpu_dai, dai_fmt); >> + if (ret < 0) { >> + dev_err(cpu_dai->dev, "failed to set cpu_dai fmt.\n"); >> + return ret; >> + } > You've already set this in the dai_link, no need to do it again. Okay, correct it in next v5. > + dev_info(&pdev->dev, "hdmi audio init success.\n"); > Please remove noisy prints like this. Okay, turn it to dev_debug(...) >> +free_cpu_of_node: >> + hdmi_audio_dai.cpu_of_node = NULL; >> + hdmi_audio_dai.platform_of_node = NULL; >> +free_priv_data: >> + snd_soc_card_set_drvdata(card, NULL); >> + platform_set_drvdata(pdev, NULL); >> + card->dev = NULL; > If any of these assignments is doing anything there's a problem with the > code. > Yes, when probe failed, program will goto this code. >> +{ >> + struct snd_soc_card *card = platform_get_drvdata(pdev); >> + >> + snd_soc_unregister_card(card); > devm_snd_soc_register_card() and you can remove this function entirely. do you mean that when I take devm_snd_soc_register_card() to register card, then I do not need unregister card any more(destroy with device) ? > >> +static const struct of_device_id rockchip_hdmi_audio_of_match[] = { >> + { .compatible = "rockchip,rk3288-hdmi-audio", }, >> + {}, >> +}; > There is no documentation for this binding, binding documentation is > mandatory. Based on the compatible string this looks like it's specific > to the SoC rather than a design for a board - is the whole card part of > the SoC? It's my fault, cause the dts patch have not CC you, I will correct it in next v5 Thanks :) Yakir