summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/c5471
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-31 23:45:21 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-31 23:45:21 +0000
commit4a16b1826cafc353fa90826cbd4416476f1ea682 (patch)
tree323f6bd35c6522a6c72895c19f536742f822f54e /nuttx/arch/arm/src/c5471
parent505963a3568ba0dc23cb0cb7b3efee58f83a49ea (diff)
downloadnuttx-4a16b1826cafc353fa90826cbd4416476f1ea682.tar.gz
nuttx-4a16b1826cafc353fa90826cbd4416476f1ea682.tar.bz2
nuttx-4a16b1826cafc353fa90826cbd4416476f1ea682.zip
LPC17xx serial now supports minimal termios ioctls; serial driver ioctl methods should not set errno variable
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4994 42af7a65-404d-4744-a932-0658087f49c3
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 0e7c53c17..ac86537ac 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 20b5be97c..83563def7 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