lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 26 Jan 2007 11:48:38 +0100
From:	Hans-Peter Nilsson <hans-peter.nilsson@...s.com>
To:	david-b@...bell.net
CC:	linux-kernel@...r.kernel.org, mikael.starvik@...s.com,
	spi-devel-general@...ts.sourceforge.net
Subject: [PATCH 2/2] take 2: (was-kind-of: 3/5 SPI tx_default) 2.6.20-rc6

Just some trivial patches to make sure the existing drivers in
the official tree don't *silently* fail with the introduction of
default_tx_word.  Never tested in any way.  Not sure if this is
all, for example I didn't look in arch/*.

Signed-off-by: Hans-Peter Nilsson <hp@...s.com>

diff -upr a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
--- a/drivers/spi/pxa2xx_spi.c	2007-01-26 10:38:49.000000000 +0100
+++ b/drivers/spi/pxa2xx_spi.c	2007-01-26 11:17:49.000000000 +0100
@@ -1077,6 +1077,9 @@ static int setup(struct spi_device *spi)
 	if (!spi->bits_per_word)
 		spi->bits_per_word = 8;
 
+	if (spi->default_tx_word != 0)
+		return -EINVAL;
+
 	if (drv_data->ssp_type != PXA25x_SSP
 		&& (spi->bits_per_word < 4 || spi->bits_per_word > 32)) {
 		dev_err(&spi->dev, "failed setup: ssp_type=%d, bits/wrd=%d "
diff -upr a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
--- a/drivers/spi/spi_mpc83xx.c	2007-01-26 10:38:49.000000000 +0100
+++ b/drivers/spi/spi_mpc83xx.c	2007-01-26 11:19:01.553401939 +0100
@@ -238,6 +238,9 @@ static int mpc83xx_spi_setup(struct spi_
 	struct mpc83xx_spi *mpc83xx_spi;
 	int retval;
 
+	if (spi->default_tx_word != 0)
+		return -EINVAL;
+
 	if (!spi->max_speed_hz)
 		return -EINVAL;
 
diff -upr a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
--- a/drivers/spi/spi_s3c24xx.c	2007-01-26 10:38:49.000000000 +0100
+++ b/drivers/spi/spi_s3c24xx.c	2007-01-26 11:19:19.014017640 +0100
@@ -153,6 +153,9 @@ static int s3c24xx_spi_setup(struct spi_
 {
 	int ret;
 
+	if (spi->default_tx_word != 0)
+		return -EINVAL;
+
 	if (!spi->bits_per_word)
 		spi->bits_per_word = 8;
 

brgds, H-P
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ