Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751636Ab3GHH4M (ORCPT ); Mon, 8 Jul 2013 03:56:12 -0400 Received: from mail-ie0-f182.google.com ([209.85.223.182]:44956 "EHLO mail-ie0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192Ab3GHH4K (ORCPT ); Mon, 8 Jul 2013 03:56:10 -0400 MIME-Version: 1.0 In-Reply-To: <51DA1D75.2010503@atmel.com> References: <1372667978-4718-1-git-send-email-richard.genoud@gmail.com> <1372667978-4718-9-git-send-email-richard.genoud@gmail.com> <51D2472B.2010407@atmel.com> <51DA1D75.2010503@atmel.com> From: Richard Genoud Date: Mon, 8 Jul 2013 09:55:48 +0200 Message-ID: Subject: Re: [RFC PATCH 08/13] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards To: Bo Shen Cc: devicetree-discuss@lists.ozlabs.org, Nicolas Ferre , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1744 Lines: 58 2013/7/8 Bo Shen : > Hi Richard, > > > On 7/5/2013 23:15, Richard Genoud wrote: >>>> >>>> + card->dev = &pdev->dev; >>>> >>+ card->owner = THIS_MODULE; >>>> >>+ card->dai_link = dai; >>>> >>+ card->num_links = 1; >>>> >>+ dai->name = "WM8731"; >>>> >>+ dai->stream_name = "WM8731 PCM"; >>>> >>+ dai->codec_dai_name = "wm8731-hifi"; >>>> >>+ dai->init = at91sam9x5ek_wm8731_init; >>>> >>+ card->dapm_widgets = at91sam9x5ek_dapm_widgets; >>>> >>+ card->num_dapm_widgets = >>>> >> ARRAY_SIZE(at91sam9x5ek_dapm_widgets); >>> >>> > >>> > >>> >Will keep these as snd_soc_card and snd_soc_dai_link structure >>> > separately? >> >> I don't really understand what you mean here. >> do you mean that something like that will more explicit ? : >> + card->dai_link[0].name = "WM8731"; >> + card->dai_link[0].stream_name = "WM8731 PCM"; >> + card->dai_link[0].codec_dai_name = "wm8731-hifi"; >> + card->dai_link[0].init = at91sam9x5ek_wm8731_init; >> > > I mean using structure to define snd_soc_card and snd_soc_dai_link, look > like: > struct snd_soc_dai_link dai_link_name = { > .name = xxx, > .stream_name = xxx, > ... > }; > > struct snd_soc_card card_name = { > .name = xxxx > .ower = THIS_MODULE, > .dai_link = &dai_link_name, > ... > }; > > In this way, I think it will be more clear than put them in code. ok, got it ! Thanks ! Richard. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/