From patchwork Mon Mar 16 10:05:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 12381 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 n2GA54d3018249 for ; Mon, 16 Mar 2009 10:05:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752295AbZCPKFB (ORCPT ); Mon, 16 Mar 2009 06:05:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752666AbZCPKFB (ORCPT ); Mon, 16 Mar 2009 06:05:01 -0400 Received: from smtp.nokia.com ([192.100.122.233]:61427 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752295AbZCPKFA (ORCPT ); Mon, 16 Mar 2009 06:05:00 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx06.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n2GA4IXY008159; Mon, 16 Mar 2009 12:04:32 +0200 Received: from vaepf101.NOE.Nokia.com ([10.160.244.86]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 16 Mar 2009 12:04:26 +0200 Received: from [172.21.41.224] ([172.21.41.224]) by vaepf101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 16 Mar 2009 12:04:26 +0200 Message-ID: <49BE2453.9020801@nokia.com> Date: Mon, 16 Mar 2009 12:05:07 +0200 From: Adrian Hunter User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Russell King - ARM Linux CC: Tony Lindgren , "linux-arm-kernel@lists.arm.linux.org.uk" , David Brownell , "linux-omap@vger.kernel.org" Subject: Re: [PATCH 10/12] ARM: OMAP3: mmc-twl4030 allow arbitrary slot names References: <20090310205824.16425.97745.stgit@localhost> <20090310211352.16425.44160.stgit@localhost> <20090315160838.GF10786@n2100.arm.linux.org.uk> In-Reply-To: <20090315160838.GF10786@n2100.arm.linux.org.uk> X-OriginalArrivalTime: 16 Mar 2009 10:04:26.0471 (UTC) FILETIME=[96B90F70:01C9A61E] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From 9b04f19a7e88f8877176c25845c38676ee3127c1 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Tue, 10 Mar 2009 22:13:52 +0100 Subject: [PATCH] ARM: OMAP3: mmc-twl4030 allow arbitrary slot names Signed-off-by: Adrian Hunter --- arch/arm/mach-omap2/mmc-twl4030.c | 6 +++++- arch/arm/mach-omap2/mmc-twl4030.h | 1 + 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c index a612a02..88b4bed 100644 --- a/arch/arm/mach-omap2/mmc-twl4030.c +++ b/arch/arm/mach-omap2/mmc-twl4030.c @@ -328,7 +328,11 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) return; } - sprintf(twl->name, "mmc%islot%i", c->mmc, 1); + if (c->name) + strlcpy(twl->name, c->name, ARRAY_SIZE(twl->name)); + else + snprintf(twl->name, ARRAY_SIZE(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 36e95a6..aa2d99b 100644 --- a/arch/arm/mach-omap2/mmc-twl4030.h +++ b/arch/arm/mach-omap2/mmc-twl4030.h @@ -14,6 +14,7 @@ struct twl4030_hsmmc_info { bool cover_only; /* No card detect - just cover switch */ int gpio_cd; /* or -EINVAL */ int gpio_wp; /* or -EINVAL */ + const char *name; /* or NULL for default */ struct device *dev; /* returned: pointer to mmc adapter */ int ocr_mask; /* temporary HACK */ };