From patchwork Sun Dec 13 00:29:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 556102 X-Patchwork-Delegate: prafulla@marvell.com 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 DC31114031D for ; Sun, 13 Dec 2015 11:46:26 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D9BCD4B81C; Sun, 13 Dec 2015 01:45:52 +0100 (CET) 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 49EBbbHrwRkg; Sun, 13 Dec 2015 01:45:52 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 73F294B841; Sun, 13 Dec 2015 01:45:11 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 73D0B4B6DE for ; Sun, 13 Dec 2015 01:35:15 +0100 (CET) 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 eWMRhGNf4c3E for ; Sun, 13 Dec 2015 01:35:15 +0100 (CET) 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.nwl.cc (orbit.nwl.cc [176.31.251.142]) by theia.denx.de (Postfix) with ESMTPS id BA6544B78E for ; Sun, 13 Dec 2015 01:35:14 +0100 (CET) Received: from mail.nwl.cc (orbit [127.0.0.1]) by mail.nwl.cc (Postfix) with ESMTP id 0EE5C21534 for ; Sun, 13 Dec 2015 01:28:55 +0100 (CET) Received: from base (orbit [IPv6:::1]) by mail.nwl.cc (Postfix) with ESMTP id DC2D021533 for ; Sun, 13 Dec 2015 01:28:54 +0100 (CET) From: Phil Sutter To: u-boot@lists.denx.de Date: Sun, 13 Dec 2015 01:29:50 +0100 X-Mailer: git-send-email 2.5.3 In-Reply-To: <1449966599-25475-1-git-send-email-phil@nwl.cc> References: <1449966599-25475-1-git-send-email-phil@nwl.cc> Message-Id: <20151213002854.DC2D021533@mail.nwl.cc> X-Virus-Scanned: ClamAV using ClamSMTP X-Mailman-Approved-At: Sun, 13 Dec 2015 01:44:47 +0100 Subject: [U-Boot] [PATCH 02/11] drivers/spi/kirkwood_spi: Fix debugging with CONFIG_DM_SPI 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The debug printing tries to reference slave->bus and slave->cs which don't exist when CONFIG_DM_SPI is defined. Signed-off-by: Phil Sutter --- drivers/spi/kirkwood_spi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c index e7b0982..0439bb2 100644 --- a/drivers/spi/kirkwood_spi.c +++ b/drivers/spi/kirkwood_spi.c @@ -161,8 +161,10 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, unsigned int tmpdout, tmpdin; int tm, isread = 0; +#ifndef CONFIG_DM_SPI debug("spi_xfer: slave %u:%u dout %p din %p bitlen %u\n", slave->bus, slave->cs, dout, din, bitlen); +#endif if (flags & SPI_XFER_BEGIN) spi_cs_activate(slave);