drivers: Replace DEV_OK by 0
This patch replaces all occurences of the macro DEV_OK by the actual value 0 at the driver level. So this patch touch the files under drivers/, include/ and samples/drivers/. This patch is part of the effort to transition from DEV_* codes to errno.h codes. Change-Id: I69980ecb9755f2fb026de5668ae9c21a4ae62d1e Signed-off-by: Andre Guedes <andre.guedes@intel.com>
This commit is contained in:
parent
69453a5d29
commit
024cfe754e
71 changed files with 302 additions and 302 deletions
|
@ -138,7 +138,7 @@ static int rtc_dw_set_alarm(struct device *dev, const uint32_t alarm_val)
|
|||
|
||||
sys_write32(alarm_val, rtc_dev->base_address + RTC_CMR);
|
||||
|
||||
return DEV_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -167,7 +167,7 @@ static int rtc_dw_set_config(struct device *dev, struct rtc_config *config)
|
|||
sys_clear_bit(rtc_dev->base_address + RTC_CCR, 0);
|
||||
}
|
||||
|
||||
return DEV_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -216,6 +216,6 @@ int rtc_dw_init(struct device *dev)
|
|||
|
||||
dev->driver_api = &funcs;
|
||||
|
||||
return DEV_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,12 +56,12 @@ static int rtc_qmsi_set_config(struct device *dev, struct rtc_config *cfg)
|
|||
if (qm_rtc_set_config(QM_RTC_0, &qm_cfg) != QM_RC_OK)
|
||||
return DEV_FAIL;
|
||||
|
||||
return DEV_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rtc_qmsi_set_alarm(struct device *dev, const uint32_t alarm_val)
|
||||
{
|
||||
return qm_rtc_set_alarm(QM_RTC_0, alarm_val) == QM_RC_OK ? DEV_OK : DEV_FAIL;
|
||||
return qm_rtc_set_alarm(QM_RTC_0, alarm_val) == QM_RC_OK ? 0 : DEV_FAIL;
|
||||
}
|
||||
|
||||
static uint32_t rtc_qmsi_read(struct device *dev)
|
||||
|
@ -89,7 +89,7 @@ static int rtc_qmsi_init(struct device *dev)
|
|||
QM_SCSS_INT->int_rtc_mask &= ~BIT(0);
|
||||
|
||||
dev->driver_api = &api;
|
||||
return DEV_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEVICE_INIT(rtc, CONFIG_RTC_DRV_NAME, &rtc_qmsi_init,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue