Fix to get a clean build with EEPROM support disabled

This commit is contained in:
Gregory Nutt 2014-11-26 15:37:01 -06:00
parent 70981eb7d5
commit 1a33afb66c
2 changed files with 7 additions and 5 deletions

View File

@ -33,11 +33,15 @@
#
############################################################################
ifneq ($(CONFIG_SPI_EE_25XX),0)
# Include SPI EEPROM support
ifeq ($(CONFIG_SPI_EEPROM),y)
# Include the Microchip/Atmel xx25xx driver
ifeq ($(CONFIG_SPI_EE_25XX),y)
CSRCS += spi_xx25xx.c
endif
# Include build support

View File

@ -612,11 +612,9 @@ static ssize_t ee25xx_read(FAR struct file *filep, FAR char *buffer,
SPI_SELECT(eedev->spi, SPIDEV_EEPROM, false);
ee25xx_unlock(eedev->spi);
if (ret > 0)
{
filep->f_pos += len;
}
/* Update the file position */
filep->f_pos += len;
ee25xx_semgive(eedev);
return len;
}