From patchwork Thu Oct 14 14:47:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 67831 X-Patchwork-Delegate: stefan.bader@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 32AE71007D6 for ; Fri, 15 Oct 2010 01:48:00 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P6P62-0004OR-4o; Thu, 14 Oct 2010 15:47:54 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P6P5z-0004Nl-8E for kernel-team@lists.ubuntu.com; Thu, 14 Oct 2010 15:47:51 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1P6P5y-0007nt-EJ; Thu, 14 Oct 2010 15:47:50 +0100 Received: from cpc2-aztw21-0-0-cust264.aztw.cable.virginmedia.com ([77.100.97.9] helo=localhost.localdomain) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P6P5y-0004MP-Ah; Thu, 14 Oct 2010 15:47:50 +0100 From: Lee Jones To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2] UBUNTU: SAUCE: Expose sdp4430/panda driver names to userspace Date: Thu, 14 Oct 2010 15:47:45 +0100 Message-Id: X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: In-Reply-To: References: Cc: Liam Girdwood X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Liam Girdwood BugLink: http://bugs.launchpad.net/bugs/637947 Signed-off-by: Lee Jones --- include/sound/soc.h | 1 + sound/soc/omap/sdp4430.c | 9 +++++++-- sound/soc/soc-core.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index a05b879..b4a2325 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -606,6 +606,7 @@ struct snd_soc_dai_link { struct snd_soc_card { const char *name; const char *long_name; + const char *driver_name; struct device *dev; struct snd_card *snd_card; struct module *owner; diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c index a21a9ed..1557ff6 100644 --- a/sound/soc/omap/sdp4430.c +++ b/sound/soc/omap/sdp4430.c @@ -717,8 +717,8 @@ static struct snd_soc_dai_link sdp4430_dai[] = { /* Audio machine driver */ static struct snd_soc_card snd_soc_sdp4430 = { - .name = "SDP4430", - .long_name = "TI OMAP4 SDP4430 Board", + .driver_name = "OMAP4", + .long_name = "TI OMAP4 Board", .dai_link = sdp4430_dai, .num_links = ARRAY_SIZE(sdp4430_dai), }; @@ -736,6 +736,11 @@ static int __init sdp4430_soc_init(void) } printk(KERN_INFO "SDP4430 SoC init\n"); + if (machine_is_omap_4430sdp()) + snd_soc_sdp4430.name = "SDP4430"; + else if (machine_is_omap4_panda()) + snd_soc_sdp4430.name = "Panda"; + sdp4430_snd_device = platform_device_alloc("soc-audio", -1); if (!sdp4430_snd_device) { printk(KERN_ERR "Platform device allocation failed\n"); diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index d1d78de..c59225e 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1773,7 +1773,7 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) snprintf(card->snd_card->longname, sizeof(card->snd_card->longname), "%s", card->long_name); snprintf(card->snd_card->driver, sizeof(card->snd_card->driver), - "%s", card->name); + "%s", card->driver_name); ret = snd_card_register(card->snd_card); if (ret < 0) {