]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hwmon/lm70.c
ARM: OMAP: 243x: Add mappings for SDRC and SMS
[linux-2.6-omap-h63xx.git] / drivers / hwmon / lm70.c
index 6ba84731b9cd826639613e46da6e0976ecdddc1e..275d392eca6116d62461db1f16b6468655af3c2e 100644 (file)
@@ -96,6 +96,10 @@ static int __devinit lm70_probe(struct spi_device *spi)
        struct lm70 *p_lm70;
        int status;
 
+       /* signaling is SPI_MODE_0 on a 3-wire link (shared SI/SO) */
+       if ((spi->mode & (SPI_CPOL|SPI_CPHA)) || !(spi->mode & SPI_3WIRE))
+               return -EINVAL;
+
        p_lm70 = kzalloc(sizeof *p_lm70, GFP_KERNEL);
        if (!p_lm70)
                return -ENOMEM;
@@ -126,7 +130,7 @@ out_dev_reg_failed:
        return status;
 }
 
-static int __exit lm70_remove(struct spi_device *spi)
+static int __devexit lm70_remove(struct spi_device *spi)
 {
        struct lm70 *p_lm70 = dev_get_drvdata(&spi->dev);