device: Fix structure attributes access

Since struct devconfig was merged earlier into struct device, let's fix
accessing config_info, name, ... attributes everywhere via:

grep -rlZ 'dev->config->' | xargs -0 sed -i 's/dev->config->/dev->/g'

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2020-03-09 12:49:07 +01:00 committed by Carles Cufí
commit 97326c0445
348 changed files with 1155 additions and 1174 deletions

View file

@ -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->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u32_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->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
/* 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->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u32_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 u8_t *tx_data,
int len)
{
const struct mcux_flexcomm_config *config = dev->config->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u8_t num_tx = 0U;
while ((len - num_tx > 0) &&
@ -110,7 +110,7 @@ static int mcux_flexcomm_fifo_fill(struct device *dev, const u8_t *tx_data,
static int mcux_flexcomm_fifo_read(struct device *dev, u8_t *rx_data,
const int len)
{
const struct mcux_flexcomm_config *config = dev->config->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u8_t num_rx = 0U;
while ((len - num_rx > 0) &&
@ -125,7 +125,7 @@ static int mcux_flexcomm_fifo_read(struct device *dev, u8_t *rx_data,
static void mcux_flexcomm_irq_tx_enable(struct device *dev)
{
const struct mcux_flexcomm_config *config = dev->config->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u32_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->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u32_t mask = kUSART_TxLevelInterruptEnable;
USART_DisableInterrupts(config->base, mask);
@ -141,7 +141,7 @@ 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->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u32_t flags = USART_GetStatusFlags(config->base);
return (flags & kUSART_TxFifoEmptyFlag) != 0U;
@ -149,7 +149,7 @@ static int mcux_flexcomm_irq_tx_complete(struct device *dev)
static int mcux_flexcomm_irq_tx_ready(struct device *dev)
{
const struct mcux_flexcomm_config *config = dev->config->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u32_t mask = kUSART_TxLevelInterruptEnable;
return (USART_GetEnabledInterrupts(config->base) & mask)
@ -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->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u32_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->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u32_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->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u32_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->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u32_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->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u32_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->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
u32_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->config_info;
const struct mcux_flexcomm_config *config = dev->config_info;
usart_config_t usart_config;
u32_t clock_freq;