device: Apply config_info rename everywhere
Via coccinelle: @r_device_config@ struct device *D; @@ D-> - config_info + config And 2 grep/sed rules for macros: git grep -rlz 'dev)->config_info' | xargs -0 sed -i 's/dev)->config_info/dev)->config/g' git grep -rlz 'dev->config_info' | xargs -0 sed -i 's/dev->config_info/dev->config/g' Fixes #27397 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
a46b4a9921
commit
af6140cc0d
324 changed files with 1048 additions and 1071 deletions
|
@ -40,7 +40,7 @@ struct mcux_flexcomm_data {
|
|||
|
||||
static int mcux_flexcomm_poll_in(struct device *dev, unsigned char *c)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint32_t flags = USART_GetStatusFlags(config->base);
|
||||
int ret = -1;
|
||||
|
||||
|
@ -55,7 +55,7 @@ static int mcux_flexcomm_poll_in(struct device *dev, unsigned char *c)
|
|||
static void mcux_flexcomm_poll_out(struct device *dev,
|
||||
unsigned char c)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
|
||||
/* Wait until space is available in TX FIFO */
|
||||
while (!(USART_GetStatusFlags(config->base) & kUSART_TxFifoEmptyFlag)) {
|
||||
|
@ -66,7 +66,7 @@ static void mcux_flexcomm_poll_out(struct device *dev,
|
|||
|
||||
static int mcux_flexcomm_err_check(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint32_t flags = USART_GetStatusFlags(config->base);
|
||||
int err = 0;
|
||||
|
||||
|
@ -94,7 +94,7 @@ static int mcux_flexcomm_err_check(struct device *dev)
|
|||
static int mcux_flexcomm_fifo_fill(struct device *dev, const uint8_t *tx_data,
|
||||
int len)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint8_t num_tx = 0U;
|
||||
|
||||
while ((len - num_tx > 0) &&
|
||||
|
@ -110,7 +110,7 @@ static int mcux_flexcomm_fifo_fill(struct device *dev, const uint8_t *tx_data,
|
|||
static int mcux_flexcomm_fifo_read(struct device *dev, uint8_t *rx_data,
|
||||
const int len)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint8_t num_rx = 0U;
|
||||
|
||||
while ((len - num_rx > 0) &&
|
||||
|
@ -125,7 +125,7 @@ static int mcux_flexcomm_fifo_read(struct device *dev, uint8_t *rx_data,
|
|||
|
||||
static void mcux_flexcomm_irq_tx_enable(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint32_t mask = kUSART_TxLevelInterruptEnable;
|
||||
|
||||
USART_EnableInterrupts(config->base, mask);
|
||||
|
@ -133,7 +133,7 @@ static void mcux_flexcomm_irq_tx_enable(struct device *dev)
|
|||
|
||||
static void mcux_flexcomm_irq_tx_disable(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint32_t mask = kUSART_TxLevelInterruptEnable;
|
||||
|
||||
USART_DisableInterrupts(config->base, mask);
|
||||
|
@ -141,14 +141,14 @@ static void mcux_flexcomm_irq_tx_disable(struct device *dev)
|
|||
|
||||
static int mcux_flexcomm_irq_tx_complete(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
|
||||
return (config->base->STAT & USART_STAT_TXIDLE_MASK) != 0;
|
||||
}
|
||||
|
||||
static int mcux_flexcomm_irq_tx_ready(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint32_t mask = kUSART_TxLevelInterruptEnable;
|
||||
uint32_t flags = USART_GetStatusFlags(config->base);
|
||||
|
||||
|
@ -158,7 +158,7 @@ static int mcux_flexcomm_irq_tx_ready(struct device *dev)
|
|||
|
||||
static void mcux_flexcomm_irq_rx_enable(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint32_t mask = kUSART_RxLevelInterruptEnable;
|
||||
|
||||
USART_EnableInterrupts(config->base, mask);
|
||||
|
@ -166,7 +166,7 @@ static void mcux_flexcomm_irq_rx_enable(struct device *dev)
|
|||
|
||||
static void mcux_flexcomm_irq_rx_disable(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint32_t mask = kUSART_RxLevelInterruptEnable;
|
||||
|
||||
USART_DisableInterrupts(config->base, mask);
|
||||
|
@ -174,7 +174,7 @@ static void mcux_flexcomm_irq_rx_disable(struct device *dev)
|
|||
|
||||
static int mcux_flexcomm_irq_rx_full(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint32_t flags = USART_GetStatusFlags(config->base);
|
||||
|
||||
return (flags & kUSART_RxFifoNotEmptyFlag) != 0U;
|
||||
|
@ -182,7 +182,7 @@ static int mcux_flexcomm_irq_rx_full(struct device *dev)
|
|||
|
||||
static int mcux_flexcomm_irq_rx_ready(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint32_t mask = kUSART_RxLevelInterruptEnable;
|
||||
|
||||
return (USART_GetEnabledInterrupts(config->base) & mask)
|
||||
|
@ -191,7 +191,7 @@ static int mcux_flexcomm_irq_rx_ready(struct device *dev)
|
|||
|
||||
static void mcux_flexcomm_irq_err_enable(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint32_t mask = kStatus_USART_NoiseError |
|
||||
kStatus_USART_FramingError |
|
||||
kStatus_USART_ParityError;
|
||||
|
@ -201,7 +201,7 @@ static void mcux_flexcomm_irq_err_enable(struct device *dev)
|
|||
|
||||
static void mcux_flexcomm_irq_err_disable(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
uint32_t mask = kStatus_USART_NoiseError |
|
||||
kStatus_USART_FramingError |
|
||||
kStatus_USART_ParityError;
|
||||
|
@ -244,7 +244,7 @@ static void mcux_flexcomm_isr(void *arg)
|
|||
|
||||
static int mcux_flexcomm_init(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcomm_config *config = dev->config_info;
|
||||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
usart_config_t usart_config;
|
||||
uint32_t clock_freq;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue