Skip to contentSkip to conversation

fix spidev compilation when VERBOSE is defined

PATCH In review Florian Fainelli 1 participant 2 messages Oct 6, 2009 – Oct 23, 2009 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix spidev compilation when VERBOSE is defined

(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 <[email protected]>
CC Maxime Bizon <[email protected]>

--

drivers/spi/spidev.c +3 -3
index 5d869c4..c80c31b 100644
@@ -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);
 	}
#1 lore raw

David,

Ping ?

Quoted 48 lines · On Tuesday 06 October 2009 17:59:16 Florian Fainelli wrote:

(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 <[email protected]>
CC Maxime Bizon <[email protected]>

--

drivers/spi/spidev.c +3 -4
index 5d869c4..c80c31b 100644
@@ -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);
 	}
 
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 1 line
Florian