drivers: use unsigned int for irq_lock()

irq_lock() returns an unsigned integer key.
Generated by spatch using semantic patch
scripts/coccinelle/irq_lock.cocci

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
Johann Fischer 2022-07-13 16:50:25 +02:00 committed by Mahesh Mahadevan
commit 5e5ea9a21d
21 changed files with 65 additions and 65 deletions

View file

@ -66,7 +66,7 @@ static int dma_sam0_config(const struct device *dev, uint32_t channel,
struct dma_block_config *block = config->head_block;
struct dma_sam0_channel *channel_control;
DMAC_BTCTRL_Type btctrl = { .reg = 0 };
int key;
unsigned int key;
if (channel >= DMAC_CH_NUM) {
LOG_ERR("Unsupported channel");
@ -262,7 +262,7 @@ inval:
static int dma_sam0_start(const struct device *dev, uint32_t channel)
{
int key = irq_lock();
unsigned int key = irq_lock();
ARG_UNUSED(dev);
@ -293,7 +293,7 @@ static int dma_sam0_start(const struct device *dev, uint32_t channel)
static int dma_sam0_stop(const struct device *dev, uint32_t channel)
{
int key = irq_lock();
unsigned int key = irq_lock();
ARG_UNUSED(dev);
@ -316,7 +316,7 @@ static int dma_sam0_reload(const struct device *dev, uint32_t channel,
{
struct dma_sam0_data *data = dev->data;
DmacDescriptor *desc = &data->descriptors[channel];
int key = irq_lock();
unsigned int key = irq_lock();
switch (desc->BTCTRL.bit.BEATSIZE) {
case DMAC_BTCTRL_BEATSIZE_BYTE_Val: