spi: spi_s3c24xx driver must init completion
[sfrench/cifs-2.6.git] / drivers / spi / spi_s3c24xx.c
index 6e834b8b9d2785f51427cd11d3a051e9e9471b03..6f2c79da984dc01bb7b359f5ffb5a6a98ef5b7b0 100644 (file)
@@ -192,8 +192,11 @@ static int s3c24xx_spi_txrx(struct spi_device *spi, struct spi_transfer *t)
        hw->len = t->len;
        hw->count = 0;
 
+       init_completion(&hw->done);
+
        /* send the first byte */
        writeb(hw_txbyte(hw, 0), hw->regs + S3C2410_SPTDAT);
+
        wait_for_completion(&hw->done);
 
        return hw->count;
@@ -415,7 +418,7 @@ static int s3c24xx_spi_resume(struct platform_device *pdev)
 #define s3c24xx_spi_resume  NULL
 #endif
 
-MODULE_ALIAS("s3c2410_spi");                   /* for platform bus hotplug */
+MODULE_ALIAS("platform:s3c2410-spi");
 static struct platform_driver s3c24xx_spidrv = {
        .remove         = __exit_p(s3c24xx_spi_remove),
        .suspend        = s3c24xx_spi_suspend,