From patchwork Thu Sep 4 22:27:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 386028 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 44C901400A0 for ; Fri, 5 Sep 2014 08:29:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F2511A7461; Fri, 5 Sep 2014 00:29:02 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 s5pt7m+Mh1pr; Fri, 5 Sep 2014 00:29:02 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4A952A7464; Fri, 5 Sep 2014 00:28:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6736EA758D for ; Fri, 5 Sep 2014 00:28:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 GzCR1IKzcQF4 for ; Fri, 5 Sep 2014 00:28:40 +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 mail-ie0-f202.google.com (mail-ie0-f202.google.com [209.85.223.202]) by theia.denx.de (Postfix) with ESMTPS id 918A6A7423 for ; Fri, 5 Sep 2014 00:28:36 +0200 (CEST) Received: by mail-ie0-f202.google.com with SMTP id rl12so1890162iec.1 for ; Thu, 04 Sep 2014 15:28:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XAypTiOrXH7qhSpI9fT3Lhz2yzBylxGD6lQ/TOFgbSY=; b=Uf4XF+VgSyZGog8nx+w5qyimxy+aFLs94VfwIR5EoHIqzb/MaAzlGawx077rwiCbx/ 1jUCXryWNZKMmoth264cPnUz6x6FdB1O19uKCIvQlc8EZJpmiSl8qbdcUtJpLfOnIBve iCkhlWG3swMEQKVw1LS9UiEYYjUZRtdCd56f/IdMytn7H+h7ojvFbMFZjcv6cBjT4Dwj myb0Iv4Ntn1LjfMktz++Z3hN9dzMUziHbXsXqlhGfoFJpWGdHOw7gx/HEQKM9OG78Iav HoZX06/e/CJ64jiNPK7WoEWtxrvSItwAEy9TTH8kN7IMbu9BYG8w45cT3JO/DcTM8NLb +/0A== X-Gm-Message-State: ALoCoQkH5Na5x+bv/1uqTKVUVMXFfQkOyCVIexyGPbM5EuishU2FGal4lwwaXjWAlQa0KgQosNg1 X-Received: by 10.42.90.209 with SMTP id l17mr2976394icm.34.1409869715285; Thu, 04 Sep 2014 15:28:35 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id d7si60650yho.2.2014.09.04.15.28.35 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Sep 2014 15:28:35 -0700 (PDT) Received: from kaki.bld.corp.google.com (kaki.bld.corp.google.com [172.29.216.32]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 229405A43BF; Thu, 4 Sep 2014 15:28:35 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id C033B220DDE; Thu, 4 Sep 2014 16:28:34 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Thu, 4 Sep 2014 16:27:23 -0600 Message-Id: <1409869656-29160-2-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1409869656-29160-1-git-send-email-sjg@chromium.org> References: <1409869656-29160-1-git-send-email-sjg@chromium.org> Cc: Stephen Warren , u-boot-review@google.com, Tom Warren , Tom Rini Subject: [U-Boot] [PATCH v5 01/14] serial: Set up the 'priv' pointer when creating a serial device X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The stdio_dev structure has a private pointer for its creator, but it is not set up by the serial system. Set it to point to the serial device so that it can be found by code called by stdio. Signed-off-by: Simon Glass --- Changes in v5: None Changes in v4: None Changes in v3: - Fix typo in commit message Changes in v2: None drivers/serial/serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index d2eb752..bbe60af 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -320,6 +320,7 @@ void serial_stdio_init(void) dev.puts = serial_stub_puts; dev.getc = serial_stub_getc; dev.tstc = serial_stub_tstc; + dev.priv = s; stdio_register(&dev);