drivers: Replace DEV_NO_SUPPORT by -ENODEV
This patch replaces all occurences of the macro DEV_NO_SUPPORT by -ENODEV at the driver level. So this patch touch the files under drivers/, include/ and samples/drivers/ when applicable. This patch is part of the effort to transition from DEV_* codes to errno.h codes. Change-Id: I03007527367b03e6fd72a85004b7d3b81046a6a6 Signed-off-by: Andre Guedes <andre.guedes@intel.com>
This commit is contained in:
parent
2a4c5fce00
commit
aca7cb1efd
|
@ -41,7 +41,7 @@ static inline int spi_flash_wb_id(struct device *dev)
|
|||
temp_data |= (uint32_t) buf[3];
|
||||
|
||||
if (temp_data != W25QXXDV_RDID_VALUE) {
|
||||
return DEV_NO_SUPPORT;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -118,7 +118,7 @@ static int spi_flash_wb_read(struct device *dev, off_t offset, void *data,
|
|||
uint8_t *buf = driver_data->buf;
|
||||
|
||||
if (len > CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN || offset < 0) {
|
||||
return DEV_NO_SUPPORT;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
nano_sem_take(&driver_data->sem, TICKS_UNLIMITED);
|
||||
|
@ -287,7 +287,7 @@ static int spi_flash_wb_erase(struct device *dev, off_t offset, size_t size)
|
|||
if ((offset < 0) ||
|
||||
((size + offset) >= CONFIG_SPI_FLASH_W25QXXDV_FLASH_SIZE) ||
|
||||
((size & W25QXXDV_SECTOR_MASK) != 0)) {
|
||||
return DEV_NO_SUPPORT;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
nano_sem_take(&driver_data->sem, TICKS_UNLIMITED);
|
||||
|
|
|
@ -268,12 +268,12 @@ static inline int gpio_qmsi_disable_callback(struct device *port, int access_op,
|
|||
|
||||
static inline int gpio_qmsi_suspend_port(struct device *port)
|
||||
{
|
||||
return DEV_NO_SUPPORT;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int gpio_qmsi_resume_port(struct device *port)
|
||||
{
|
||||
return DEV_NO_SUPPORT;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static struct gpio_driver_api api_funcs = {
|
||||
|
|
|
@ -187,12 +187,12 @@ static int i2c_qmsi_transfer(struct device *dev, struct i2c_msg *msgs,
|
|||
|
||||
static int i2c_qmsi_suspend(struct device *dev)
|
||||
{
|
||||
return DEV_NO_SUPPORT;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int i2c_qmsi_resume(struct device *dev)
|
||||
{
|
||||
return DEV_NO_SUPPORT;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static struct i2c_driver_api api = {
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <device.h>
|
||||
#include <ioapic.h>
|
||||
#include <uart.h>
|
||||
|
@ -312,7 +314,7 @@ static int uart_qmsi_line_ctrl_set(struct device *dev, uint32_t ctrl, uint32_t v
|
|||
qm_uart_set_config(instance, &cfg);
|
||||
break;
|
||||
default:
|
||||
return DEV_NO_SUPPORT;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -322,7 +324,7 @@ static int uart_qmsi_line_ctrl_set(struct device *dev, uint32_t ctrl, uint32_t v
|
|||
#ifdef CONFIG_UART_DRV_CMD
|
||||
static int uart_qmsi_drv_cmd(struct device *dev, uint32_t cmd, uint32_t p)
|
||||
{
|
||||
return DEV_NO_SUPPORT;
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif /* CONFIG_UART_DRV_CMD */
|
||||
|
||||
|
|
Loading…
Reference in a new issue