From patchwork Wed May 6 02:37:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Haikun.Wang@freescale.com" X-Patchwork-Id: 468564 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 48A1D14010F for ; Wed, 6 May 2015 12:41:34 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BEE104B825; Wed, 6 May 2015 04:41:31 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eG56DkhLjqRw; Wed, 6 May 2015 04:41:31 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2F6E44B81A; Wed, 6 May 2015 04:41:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CF3854B81A for ; Wed, 6 May 2015 04:41:28 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nF47WMzTWqpm for ; Wed, 6 May 2015 04:41:28 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0137.outbound.protection.outlook.com [207.46.100.137]) by theia.denx.de (Postfix) with ESMTPS id 23D664B819 for ; Wed, 6 May 2015 04:41:23 +0200 (CEST) Received: from BY2PR03CA006.namprd03.prod.outlook.com (10.255.93.23) by BY2PR0301MB0614.namprd03.prod.outlook.com (25.160.125.24) with Microsoft SMTP Server (TLS) id 15.1.154.19; Wed, 6 May 2015 02:41:20 +0000 Received: from BN1AFFO11FD019.protection.gbl (10.255.93.4) by BY2PR03CA006.outlook.office365.com (10.255.93.23) with Microsoft SMTP Server (TLS) id 15.1.154.19 via Frontend Transport; Wed, 6 May 2015 02:41:20 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD019.mail.protection.outlook.com (10.58.52.79) with Microsoft SMTP Server (TLS) id 15.1.160.8 via Frontend Transport; Wed, 6 May 2015 02:41:19 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t462fGJq021195; Tue, 5 May 2015 19:41:17 -0700 From: Haikun Wang To: Date: Wed, 6 May 2015 10:37:43 +0800 Message-ID: <1430879863-32695-1-git-send-email-haikun.wang@freescale.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(104016003)(107886002)(85426001)(6806004)(105606002)(189998001)(110136002)(47776003)(106466001)(87936001)(229853001)(2351001)(62966003)(19580395003)(50986999)(77096005)(86362001)(33646002)(92566002)(50226001)(5001960100002)(77156002)(48376002)(46102003)(19580405001)(50466002)(36756003)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR0301MB0614; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0614; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BY2PR0301MB0614; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0301MB0614; X-Forefront-PRVS: 0568F32D91 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2015 02:41:19.5230 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0614 Subject: [U-Boot] [PATCH v2] dm: sf: Update default name of spi flash in structure udevice X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Default name of spi flash like this "0:0", update it to "spi_flash@0:0". Signed-off-by: Haikun Wang Acked-by: Simon Glass --- Changes in v2: - Increase the size of array "name" to 30 Changes in v1: None drivers/mtd/spi/sf-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c index 4b25902..350e21a 100644 --- a/drivers/mtd/spi/sf-uclass.c +++ b/drivers/mtd/spi/sf-uclass.c @@ -53,10 +53,10 @@ int spi_flash_probe_bus_cs(unsigned int busnum, unsigned int cs, { struct spi_slave *slave; struct udevice *bus; - char name[20], *str; + char name[30], *str; int ret; - snprintf(name, sizeof(name), "%d:%d", busnum, cs); + snprintf(name, sizeof(name), "spi_flash@%d:%d", busnum, cs); str = strdup(name); ret = spi_get_bus_and_cs(busnum, cs, max_hz, spi_mode, "spi_flash_std", str, &bus, &slave);