From 7ee6c5bcfc9f414f536b975fe62f64e49830140e Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 23 Jan 2016 19:18:55 -0600 Subject: [PATCH] Minor clean-up for last big commit --- drivers/lcd/p14201.c | 39 --------------------------------------- drivers/net/encx24j600.c | 31 ------------------------------- 2 files changed, 70 deletions(-) diff --git a/drivers/lcd/p14201.c b/drivers/lcd/p14201.c index a1df779364..8d51c77a97 100644 --- a/drivers/lcd/p14201.c +++ b/drivers/lcd/p14201.c @@ -205,7 +205,6 @@ struct rit_dev_s /* Low-level SPI helpers */ -static inline void rit_configspi(FAR struct spi_dev_s *spi); static void rit_select(FAR struct spi_dev_s *spi); static void rit_deselect(FAR struct spi_dev_s *spi); static void rit_sndbytes(FAR struct rit_dev_s *priv, FAR const uint8_t *buffer, @@ -423,43 +422,6 @@ static const uint8_t g_setallrow[] = * Private Functions **************************************************************************************/ -/************************************************************************************** - * Name: rit_configspi - * - * Description: - * Configure the SPI for use with the P14201 - * - * Input Parameters: - * spi - Reference to the SPI driver structure - * - * Returned Value: - * None - * - * Assumptions: - * - **************************************************************************************/ - -static inline void rit_configspi(FAR struct spi_dev_s *spi) -{ -#ifdef CONFIG_P14201_FREQUENCY - ritdbg("Mode: %d Bits: 8 Frequency: %d\n", - CONFIG_P14201_SPIMODE, CONFIG_P14201_FREQUENCY); -#else - ritdbg("Mode: %d Bits: 8\n", CONFIG_P14201_SPIMODE); -#endif - - /* Configure SPI for the P14201. But only if we own the SPI bus. Otherwise, don't - * bother because it might change. - */ - - SPI_SETMODE(spi, CONFIG_P14201_SPIMODE); - SPI_SETBITS(spi, 8); - (void)SPI_HWFEATURES(spi, 0); -#ifdef CONFIG_P14201_FREQUENCY - (void)SPI_SETFREQUENCY(spi, CONFIG_P14201_FREQUENCY) -#endif -} - /************************************************************************************** * Name: rit_select * @@ -1204,7 +1166,6 @@ FAR struct lcd_dev_s *rit_initialize(FAR struct spi_dev_s *spi, unsigned int dev /* Select the SD1329 controller */ - rit_configspi(spi); rit_select(spi); /* Clear the display */ diff --git a/drivers/net/encx24j600.c b/drivers/net/encx24j600.c index 4eeb85f2e6..7cc6791c70 100644 --- a/drivers/net/encx24j600.c +++ b/drivers/net/encx24j600.c @@ -285,7 +285,6 @@ static struct enc_driver_s g_encx24j600[CONFIG_ENCX24J600_NINTERFACES]; /* Low-level SPI helpers */ -static inline void enc_configspi(FAR struct spi_dev_s *spi); static void enc_lock(FAR struct enc_driver_s *priv); static inline void enc_unlock(FAR struct enc_driver_s *priv); @@ -373,32 +372,6 @@ static int enc_reset(FAR struct enc_driver_s *priv); * Private Functions ****************************************************************************/ -/**************************************************************************** - * Function: enc_configspi - * - * Description: - * Configure the SPI for use with the ENCX24J600 - * - * Parameters: - * spi - Reference to the SPI driver structure - * - * Returned Value: - * None - * - * Assumptions: - * - ****************************************************************************/ - -static inline void enc_configspi(FAR struct spi_dev_s *spi) -{ - /* Configure SPI for the ENCX24J600. */ - - SPI_SETMODE(spi, CONFIG_ENCX24J600_SPIMODE); - SPI_SETBITS(spi, 8); - (void)SPI_HWFEATURES(spi, 0); - (void)SPI_SETFREQUENCY(spi, CONFIG_ENCX24J600_FREQUENCY); -} - /**************************************************************************** * Function: enc_lock * @@ -2912,10 +2885,6 @@ int enc_initialize(FAR struct spi_dev_s *spi, return -EAGAIN; } - /* Configure SPI for the ENCX24J600 */ - - enc_configspi(priv->spi); - /* Lock the SPI bus so that we have exclusive access */ enc_lock(priv);