From 8b20c8cb89b733f5a73fad1f7ad7cff8325e0034 Mon Sep 17 00:00:00 2001 From: "Govindraj.R" Date: Wed, 1 Jun 2011 11:31:24 +0530 Subject: spi/omap2: fix uninitialized variable fixes below compilation warning. The variable doesn't actual ever get used uninitialized, but that's no reason to be sloppy. drivers/spi/omap2_mcspi.c: In function 'omap2_mcspi_txrx_dma': drivers/spi/omap2_mcspi.c:301: warning: 'elements' may be used uninitialized in this function Signed-off-by: Govindraj.R [grant.likely: amended description] Signed-off-by: Grant Likely --- drivers/spi/omap2_mcspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index 6f86ba0..969cdd2 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c @@ -298,7 +298,7 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer) unsigned int count, c; unsigned long base, tx_reg, rx_reg; int word_len, data_type, element_count; - int elements; + int elements = 0; u32 l; u8 * rx; const u8 * tx; -- cgit v1.1 From a80fd9db0e1909a03e5d5a29e2e73001e38d12f5 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 8 Jun 2011 21:48:03 +0200 Subject: spi/rtc-m41t93: Use spi_get_drvdata() for SPI devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One new offender detected by the recently increased type checking in platform_get_drvdata(): drivers/rtc/rtc-m41t93.c: In function ‘m41t93_remove’: drivers/rtc/rtc-m41t93.c:192: warning: passing argument 1 of ‘platform_get_drvdata’ from incompatible pointer type Use spi_get_drvdata() instead of platform_get_drvdata(), cfr. commit 42fea15d6dc410e62dac6a764142045280624a5b ("spi/rtc-{ds1390,ds3234,m41t94}: Use spi_get_drvdata() for SPI devices") Signed-off-by: Geert Uytterhoeven Signed-off-by: Grant Likely --- drivers/rtc/rtc-m41t93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-m41t93.c b/drivers/rtc/rtc-m41t93.c index 1a84b3e..7317d3b 100644 --- a/drivers/rtc/rtc-m41t93.c +++ b/drivers/rtc/rtc-m41t93.c @@ -189,7 +189,7 @@ static int __devinit m41t93_probe(struct spi_device *spi) static int __devexit m41t93_remove(struct spi_device *spi) { - struct rtc_device *rtc = platform_get_drvdata(spi); + struct rtc_device *rtc = spi_get_drvdata(spi); if (rtc) rtc_device_unregister(rtc); -- cgit v1.1