device: Redefine DEV_* error codes
This patch redefines DEV_* error codes in terms of errno.h codes. Change-Id: Iab994c40265c294296491d427f65c38abd48b795 Signed-off-by: Andre Guedes <andre.guedes@intel.com>
This commit is contained in:
parent
3fee959d9d
commit
69453a5d29
1 changed files with 9 additions and 7 deletions
|
@ -18,6 +18,8 @@
|
|||
#ifndef _DEVICE_H_
|
||||
#define _DEVICE_H_
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
/**
|
||||
* @brief Device Driver APIs
|
||||
* @defgroup io_interfaces Device Driver APIs
|
||||
|
@ -149,13 +151,13 @@ extern "C" {
|
|||
|
||||
/* Common Error Codes devices can provide */
|
||||
#define DEV_OK 0 /* No error */
|
||||
#define DEV_FAIL 1 /* General operation failure */
|
||||
#define DEV_INVALID_OP 2 /* Invalid operation */
|
||||
#define DEV_INVALID_CONF 3 /* Invalid configuration */
|
||||
#define DEV_USED 4 /* Device controller in use */
|
||||
#define DEV_NO_ACCESS 5 /* Controller not accessible */
|
||||
#define DEV_NO_SUPPORT 6 /* Device type not supported */
|
||||
#define DEV_NOT_CONFIG 7 /* Device not configured */
|
||||
#define DEV_FAIL (-EIO) /* General operation failure */
|
||||
#define DEV_INVALID_OP (-ENOTSUP) /* Invalid operation */
|
||||
#define DEV_INVALID_CONF (-EINVAL) /* Invalid configuration */
|
||||
#define DEV_USED (-EBUSY) /* Device controller in use */
|
||||
#define DEV_NO_ACCESS (-EACCES) /* Controller not accessible */
|
||||
#define DEV_NO_SUPPORT (-ENODEV) /* Device type not supported */
|
||||
#define DEV_NOT_CONFIG (-EPERM) /* Device not configured */
|
||||
|
||||
struct device;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue