summaryrefslogtreecommitdiffstats
path: root/nuttx/arch/arm/src/c5471
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-07-31 23:45:21 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-07-31 23:45:21 +0000
commit5613fbf73362a2e94ba18c8671669703f77da191 (patch)
tree323f6bd35c6522a6c72895c19f536742f822f54e /nuttx/arch/arm/src/c5471
parent4f4e8123b61339fa053b597f14dd0697b675eebf (diff)
LPC17xx serial now supports minimal termios ioctls; serial driver ioctl methods should not set errno variable
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4994 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/arch/arm/src/c5471')
-rw-r--r--nuttx/arch/arm/src/c5471/c5471_serial.c10
-rw-r--r--nuttx/arch/arm/src/c5471/c5471_watchdog.c9
2 files changed, 8 insertions, 11 deletions
diff --git a/nuttx/arch/arm/src/c5471/c5471_serial.c b/nuttx/arch/arm/src/c5471/c5471_serial.c
index 0e7c53c179..ac86537acb 100644
--- a/nuttx/arch/arm/src/c5471/c5471_serial.c
+++ b/nuttx/arch/arm/src/c5471/c5471_serial.c
@@ -1,8 +1,8 @@
/****************************************************************************
* c5471/c5471_serial.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -625,8 +625,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
struct up_dev_s *user = (struct up_dev_s*)arg;
if (!user)
{
- *get_errno_ptr() = EINVAL;
- ret = ERROR;
+ ret = -EINVAL;
}
else
{
@@ -653,8 +652,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
break;
default:
- *get_errno_ptr() = ENOTTY;
- ret = ERROR;
+ ret = -ENOTTY;
break;
}
diff --git a/nuttx/arch/arm/src/c5471/c5471_watchdog.c b/nuttx/arch/arm/src/c5471/c5471_watchdog.c
index 20b5be97c8..83563def7f 100644
--- a/nuttx/arch/arm/src/c5471/c5471_watchdog.c
+++ b/nuttx/arch/arm/src/c5471/c5471_watchdog.c
@@ -1,8 +1,8 @@
/**************************************************************************
* c5471/c5471_watchdog.c
*
- * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007, 2009, 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -302,8 +302,7 @@ static int wdt_ioctl(FAR struct file *filp, int cmd, unsigned long arg)
break;
default:
- *get_errno_ptr() = ENOTTY;
- return ERROR;
+ return -ENOTTY;
}
return OK;
@@ -319,7 +318,7 @@ static int wdt_open(struct file *filep)
if (g_wdtopen)
{
- *get_errno_ptr() = EBUSY;
+ return -EBUSY;
}
/* This will automatically load the timer with its max