drivers: remove redundant DEV_NAME helpers

Just use dev->name. This change follow same principles applied when
DEV_CFG and DEV_DATA macros were removed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-03-15 20:13:24 +01:00 committed by Anas Nashif
commit 9953c194b9
21 changed files with 25 additions and 67 deletions

View file

@ -85,8 +85,6 @@ struct i2s_cavs_dev_data {
struct stream rx;
};
#define DEV_NAME(dev) ((dev)->name)
static void i2s_dma_tx_callback(const struct device *, void *, uint32_t, int);
static void i2s_tx_stream_disable(struct i2s_cavs_dev_data *,
volatile struct i2s_cavs_ssp *const, const struct device *);
@ -791,7 +789,7 @@ static int i2s_cavs_initialize(const struct device *dev)
dev_data->tx.state = I2S_STATE_NOT_READY;
dev_data->rx.state = I2S_STATE_NOT_READY;
LOG_INF("Device %s initialized", DEV_NAME(dev));
LOG_INF("Device %s initialized", dev->name);
return 0;
}

View file

@ -98,8 +98,6 @@ struct i2s_sam_dev_data {
struct stream tx;
};
#define DEV_NAME(dev) ((dev)->name)
#define MODULO_INC(val, max) { val = (++val < max) ? val : 0; }
static const struct device *get_dev_from_dma_channel(uint32_t dma_channel);
@ -980,7 +978,7 @@ static int i2s_sam_initialize(const struct device *dev)
/* Enable module's IRQ */
irq_enable(dev_cfg->irq_id);
LOG_INF("Device %s initialized", DEV_NAME(dev));
LOG_INF("Device %s initialized", dev->name);
return 0;
}