aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Gerlach <[email protected]>2020-06-19 09:43:41 +0800
committerMark Brown <[email protected]>2020-06-19 12:56:06 +0100
commitd9dd0fb0e197ae766f0f5e06d23f5f5e1888c511 (patch)
tree290ebbc368051790b60777674d4dbbdc23777f5a
parent3820061d38156d88443d32a9a6c701d281234746 (diff)
spi: altera: fix size mismatch on 64 bit processors
The spi-altera driver was originally written with a 32 bit processor, where sizeof(unsigned long) is 4. On a 64 bit processor sizeof(unsigned long) is 8. Change the structure member to u32 to match the actual size of the control register. Signed-off-by: Matthew Gerlach <[email protected]> Signed-off-by: Xu Yilun <[email protected]> Reviewed-by: Tom Rix <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--drivers/spi/spi-altera.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
index 4f7717f16def..d91c0934a619 100644
--- a/drivers/spi/spi-altera.c
+++ b/drivers/spi/spi-altera.c
@@ -53,7 +53,7 @@ struct altera_spi {
int len;
int count;
int bytes_per_word;
- unsigned long imr;
+ u32 imr;
/* data buffers */
const unsigned char *tx;