From: Florian Fainelli <ffainelli@freebox.fr>
To: spi-devel-general@lists.sourceforge.net
Cc: dbrownell@users.sourceforge.net, Maxime Bizon <mbizon@freebox.fr>,
linux-kernel@vger.kernel.org
Subject: [PATCH] fix spidev compilation when VERBOSE is defined
Date: Tue, 6 Oct 2009 17:59:16 +0200 [thread overview]
Message-ID: <200910061759.17327.ffainelli@freebox.fr> (raw)
(please CC me as I am not subscribed to spi-devel-general).
When VERBOSE is defined in the spidev module, the compilation
will throw an error on 'spi' not being defined:
CC [M] drivers/spi/spidev.o
drivers/spi/spidev.c: In function 'spidev_message':
drivers/spi/spidev.c:266: error: 'spi' undeclared (first use in this function)
drivers/spi/spidev.c:266: error: (Each undeclared identifier is reported only once
drivers/spi/spidev.c:266: error: for each function it appears in.)
instead of using spi-> we should actually use spidev->spi.
This patch fixes the build failure.
CC: David Brownell <dbrownell@users.sourceforge.net>
CC: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
--
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 5d869c4..c80c31b 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -262,15 +262,15 @@ static int spidev_message(struct spidev_data *spidev,
k_tmp->delay_usecs = u_tmp->delay_usecs;
k_tmp->speed_hz = u_tmp->speed_hz;
#ifdef VERBOSE
- dev_dbg(&spi->dev,
+ dev_dbg(&spidev->spi->dev,
" xfer len %zd %s%s%s%dbits %u usec %uHz\n",
u_tmp->len,
u_tmp->rx_buf ? "rx " : "",
u_tmp->tx_buf ? "tx " : "",
u_tmp->cs_change ? "cs " : "",
- u_tmp->bits_per_word ? : spi->bits_per_word,
+ u_tmp->bits_per_word ? : spidev->spi->bits_per_word,
u_tmp->delay_usecs,
- u_tmp->speed_hz ? : spi->max_speed_hz);
+ u_tmp->speed_hz ? : spidev->spi->max_speed_hz);
#endif
spi_message_add_tail(k_tmp, &msg);
}
next reply other threads:[~2009-10-06 15:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 15:59 Florian Fainelli [this message]
2009-10-23 7:51 ` [PATCH] fix spidev compilation when VERBOSE is defined Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200910061759.17327.ffainelli@freebox.fr \
--to=ffainelli@freebox.fr \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mbizon@freebox.fr \
--cc=spi-devel-general@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).