From patchwork Tue Mar 10 09:33:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 10842 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2A9Yj7m032437 for ; Tue, 10 Mar 2009 09:34:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754547AbZCJJea (ORCPT ); Tue, 10 Mar 2009 05:34:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753999AbZCJJe3 (ORCPT ); Tue, 10 Mar 2009 05:34:29 -0400 Received: from smtp.nokia.com ([192.100.122.230]:51118 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754573AbZCJJe1 (ORCPT ); Tue, 10 Mar 2009 05:34:27 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx03.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n2A9Y9VB013348; Tue, 10 Mar 2009 11:34:15 +0200 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 10 Mar 2009 11:33:18 +0200 Received: from mgw-int02.ntc.nokia.com ([172.21.143.97]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 10 Mar 2009 11:33:04 +0200 Received: from [127.0.1.1] (essapo-nirac252163.europe.nokia.com [10.162.252.163]) by mgw-int02.ntc.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id n2A9X2Ds010508; Tue, 10 Mar 2009 11:33:02 +0200 From: Adrian Hunter To: Tony Lindgren Cc: Jarkko Lavinen , David Brownell , Adrian Hunter , linux-omap Mailing List Date: Tue, 10 Mar 2009 11:33:22 +0200 Message-Id: <20090310093322.16889.39355.sendpatchset@ahunter-laptop> In-Reply-To: <20090310093255.16889.30509.sendpatchset@ahunter-laptop> References: <20090310093255.16889.30509.sendpatchset@ahunter-laptop> Subject: [PATCH 4/6] OMAP: mmc-twl4030 allow arbitrary slot names X-OriginalArrivalTime: 10 Mar 2009 09:33:04.0097 (UTC) FILETIME=[36431510:01C9A163] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From 4c4a97595cab39443a85517c66bc26f5c2a9cae3 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Fri, 30 Jan 2009 11:10:19 +0200 Subject: [PATCH] OMAP: mmc-twl4030 allow arbitrary slot names Signed-off-by: Adrian Hunter Acked-by: David Brownell --- arch/arm/mach-omap2/mmc-twl4030.c | 5 ++++- arch/arm/mach-omap2/mmc-twl4030.h | 1 + 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c index a58deba..8fc8e84 100644 --- a/arch/arm/mach-omap2/mmc-twl4030.c +++ b/arch/arm/mach-omap2/mmc-twl4030.c @@ -419,7 +419,10 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) return; } - sprintf(twl->name, "mmc%islot%i", c->mmc, 1); + if (c->name) + strncpy(twl->name, c->name, HSMMC_NAME_LEN); + else + sprintf(twl->name, "mmc%islot%i", c->mmc, 1); mmc->slots[0].name = twl->name; mmc->nr_slots = 1; mmc->slots[0].wires = c->wires; diff --git a/arch/arm/mach-omap2/mmc-twl4030.h b/arch/arm/mach-omap2/mmc-twl4030.h index e87bc8d..69dbbc1 100644 --- a/arch/arm/mach-omap2/mmc-twl4030.h +++ b/arch/arm/mach-omap2/mmc-twl4030.h @@ -15,6 +15,7 @@ struct twl4030_hsmmc_info { bool cover_only; /* No card detect - just cover switch */ int gpio_cd; /* or -EINVAL */ int gpio_wp; /* or -EINVAL */ + char *name; /* or NULL for default */ struct device *dev; /* returned: pointer to mmc adapter */ };