]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: iio: accel: sca3000_core.c: Remove unused function
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Sat, 20 Dec 2014 14:53:07 +0000 (15:53 +0100)
committerJonathan Cameron <jic23@kernel.org>
Fri, 26 Dec 2014 12:40:11 +0000 (12:40 +0000)
Remove the function sca3000_check_status() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/accel/sca3000_core.c

index 9cd04c7147c8f1f30ed8a797b875357d4aa7807f..31fb2182c198267caff8af6554767d37146c4072 100644 (file)
@@ -223,33 +223,6 @@ error_ret:
        return ret;
 }
 
-#ifdef SCA3000_DEBUG
-/**
- * sca3000_check_status() check the status register
- *
- * Only used for debugging purposes
- **/
-static int sca3000_check_status(struct device *dev)
-{
-       int ret;
-       struct iio_dev *indio_dev = dev_to_iio_dev(dev);
-       struct sca3000_state *st = iio_priv(indio_dev);
-
-       mutex_lock(&st->lock);
-       ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_STATUS, 1);
-       if (ret < 0)
-               goto error_ret;
-       if (st->rx[0] & SCA3000_EEPROM_CS_ERROR)
-               dev_err(dev, "eeprom error\n");
-       if (st->rx[0] & SCA3000_SPI_FRAME_ERROR)
-               dev_err(dev, "Previous SPI Frame was corrupt\n");
-
-error_ret:
-       mutex_unlock(&st->lock);
-       return ret;
-}
-#endif /* SCA3000_DEBUG */
-
 /**
  * sca3000_show_rev() - sysfs interface to read the chip revision number
  **/