Skip to content

Commit

Permalink
bridge: reorganize return code handling
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
  • Loading branch information
felipec committed Sep 19, 2010
1 parent a468bee commit 8d80e8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 6 additions & 0 deletions dsp_bridge.c
Expand Up @@ -142,6 +142,12 @@
#define STRM_FREEBUFFER _IOWR(DB, DB_IOC(DB_STRM, 2), unsigned long)
#define STRM_ISSUE _IOW(DB, DB_IOC(DB_STRM, 6), unsigned long)

/* will not be needed when tidspbridge uses proper error codes */
#define ioctl(...) (ioctl(__VA_ARGS__) < 0)

#define DSP_SUCCEEDED(x) (!x)
#define DSP_FAILED(x) (x)

int dsp_open(void)
{
return open("/dev/DspBridge", O_RDWR);
Expand Down
3 changes: 0 additions & 3 deletions dsp_bridge.h
Expand Up @@ -17,9 +17,6 @@

#define ALLOCATE_HEAP

#define DSP_SUCCEEDED(x) ((int)(x) >= 0)
#define DSP_FAILED(x) ((int)(x) < 0)

#define DSP_MMUFAULT 0x00000010
#define DSP_SYSERROR 0x00000020
#define DSP_NODEMESSAGEREADY 0x00000200
Expand Down

0 comments on commit 8d80e8c

Please sign in to comment.