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
|
@ -12,7 +12,7 @@
|
|||
|
||||
#define DEV_DATA(dev) ((struct can_loopback_data *const)(dev)->driver_data)
|
||||
#define DEV_CFG(dev) \
|
||||
((const struct can_loopback_config *const)(dev)->config_info)
|
||||
((const struct can_loopback_config *const)(dev)->config)
|
||||
|
||||
struct can_loopback_filter {
|
||||
can_rx_callback_t rx_cb;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#define MCP2515_FRAME_LEN 13
|
||||
|
||||
#define DEV_CFG(dev) \
|
||||
((const struct mcp2515_config *const)(dev)->config_info)
|
||||
((const struct mcp2515_config *const)(dev)->config)
|
||||
#define DEV_DATA(dev) ((struct mcp2515_data *const)(dev)->driver_data)
|
||||
|
||||
struct mcp2515_tx_cb {
|
||||
|
|
|
@ -95,7 +95,7 @@ struct mcux_flexcan_data {
|
|||
static int mcux_flexcan_configure(struct device *dev, enum can_mode mode,
|
||||
uint32_t bitrate)
|
||||
{
|
||||
const struct mcux_flexcan_config *config = dev->config_info;
|
||||
const struct mcux_flexcan_config *config = dev->config;
|
||||
flexcan_config_t flexcan_config;
|
||||
struct device *clock_dev;
|
||||
uint32_t clock_freq;
|
||||
|
@ -249,7 +249,7 @@ static int mcux_flexcan_send(struct device *dev, const struct zcan_frame *msg,
|
|||
k_timeout_t timeout,
|
||||
can_tx_callback_t callback_isr, void *callback_arg)
|
||||
{
|
||||
const struct mcux_flexcan_config *config = dev->config_info;
|
||||
const struct mcux_flexcan_config *config = dev->config;
|
||||
struct mcux_flexcan_data *data = dev->driver_data;
|
||||
flexcan_mb_transfer_t xfer;
|
||||
status_t status;
|
||||
|
@ -299,7 +299,7 @@ static int mcux_flexcan_attach_isr(struct device *dev, can_rx_callback_t isr,
|
|||
void *callback_arg,
|
||||
const struct zcan_filter *filter)
|
||||
{
|
||||
const struct mcux_flexcan_config *config = dev->config_info;
|
||||
const struct mcux_flexcan_config *config = dev->config;
|
||||
struct mcux_flexcan_data *data = dev->driver_data;
|
||||
flexcan_mb_transfer_t xfer;
|
||||
status_t status;
|
||||
|
@ -361,7 +361,7 @@ static void mcux_flexcan_register_state_change_isr(struct device *dev,
|
|||
static enum can_state mcux_flexcan_get_state(struct device *dev,
|
||||
struct can_bus_err_cnt *err_cnt)
|
||||
{
|
||||
const struct mcux_flexcan_config *config = dev->config_info;
|
||||
const struct mcux_flexcan_config *config = dev->config;
|
||||
uint32_t status_flags;
|
||||
|
||||
if (err_cnt) {
|
||||
|
@ -386,7 +386,7 @@ static enum can_state mcux_flexcan_get_state(struct device *dev,
|
|||
#ifndef CONFIG_CAN_AUTO_BUS_OFF_RECOVERY
|
||||
int mcux_flexcan_recover(struct device *dev, k_timeout_t timeout)
|
||||
{
|
||||
const struct mcux_flexcan_config *config = dev->config_info;
|
||||
const struct mcux_flexcan_config *config = dev->config;
|
||||
int ret = 0;
|
||||
uint64_t start_time;
|
||||
|
||||
|
@ -414,7 +414,7 @@ int mcux_flexcan_recover(struct device *dev, k_timeout_t timeout)
|
|||
|
||||
static void mcux_flexcan_detach(struct device *dev, int filter_id)
|
||||
{
|
||||
const struct mcux_flexcan_config *config = dev->config_info;
|
||||
const struct mcux_flexcan_config *config = dev->config;
|
||||
struct mcux_flexcan_data *data = dev->driver_data;
|
||||
|
||||
if (filter_id >= MCUX_FLEXCAN_MAX_RX) {
|
||||
|
@ -443,7 +443,7 @@ static void mcux_flexcan_detach(struct device *dev, int filter_id)
|
|||
static inline void mcux_flexcan_transfer_error_status(struct device *dev,
|
||||
uint32_t error)
|
||||
{
|
||||
const struct mcux_flexcan_config *config = dev->config_info;
|
||||
const struct mcux_flexcan_config *config = dev->config;
|
||||
struct mcux_flexcan_data *data = dev->driver_data;
|
||||
can_tx_callback_t function;
|
||||
int status = CAN_TX_OK;
|
||||
|
@ -545,7 +545,7 @@ static inline void mcux_flexcan_transfer_tx_idle(struct device *dev,
|
|||
static inline void mcux_flexcan_transfer_rx_idle(struct device *dev,
|
||||
uint32_t mb)
|
||||
{
|
||||
const struct mcux_flexcan_config *config = dev->config_info;
|
||||
const struct mcux_flexcan_config *config = dev->config;
|
||||
struct mcux_flexcan_data *data = dev->driver_data;
|
||||
can_rx_callback_t function;
|
||||
flexcan_mb_transfer_t xfer;
|
||||
|
@ -610,7 +610,7 @@ static void mcux_flexcan_transfer_callback(CAN_Type *base,
|
|||
static void mcux_flexcan_isr(void *arg)
|
||||
{
|
||||
struct device *dev = (struct device *)arg;
|
||||
const struct mcux_flexcan_config *config = dev->config_info;
|
||||
const struct mcux_flexcan_config *config = dev->config;
|
||||
struct mcux_flexcan_data *data = dev->driver_data;
|
||||
|
||||
FLEXCAN_TransferHandleIRQ(config->base, &data->handle);
|
||||
|
@ -618,7 +618,7 @@ static void mcux_flexcan_isr(void *arg)
|
|||
|
||||
static int mcux_flexcan_init(struct device *dev)
|
||||
{
|
||||
const struct mcux_flexcan_config *config = dev->config_info;
|
||||
const struct mcux_flexcan_config *config = dev->config;
|
||||
struct mcux_flexcan_data *data = dev->driver_data;
|
||||
int err;
|
||||
int i;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#define DEV_DATA(dev) ((struct can_stm32_data *const)(dev)->driver_data)
|
||||
#define DEV_CFG(dev) \
|
||||
((const struct can_stm32_config *const)(dev)->config_info)
|
||||
((const struct can_stm32_config *const)(dev)->config)
|
||||
|
||||
#define BIT_SEG_LENGTH(cfg) ((cfg)->prop_ts1 + (cfg)->ts2 + 1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue