diff mbox

spi/pl022: make sure the chip_info dev pointer is set

Message ID 1285839648-7368-1-git-send-email-linus.walleij@stericsson.com (mailing list archive)
State Rejected
Headers show

Commit Message

Linus Walleij Sept. 30, 2010, 9:40 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
index 4c37c4e..90a7e5d 100644
--- a/drivers/spi/amba-pl022.c
+++ b/drivers/spi/amba-pl022.c
@@ -1574,6 +1574,8 @@  static int pl022_setup(struct spi_device *spi)
 		chip_info->duplex = SSP_MICROWIRE_CHANNEL_FULL_DUPLEX;
 		chip_info->cs_control = null_cs_control;
 	} else {
+		/* Users should not set this field */
+		chip_info->dev = &spi->dev;
 		dev_dbg(&spi->dev,
 			"using user supplied controller_data settings\n");
 	}