[rtems commit] libcpu/sh/sh7045/sci/sci.c: Eliminate use of obsolete method
Joel Sherrill
joel at rtems.org
Tue Oct 21 14:36:32 UTC 2014
Module: rtems
Branch: master
Commit: 82f5ec45e96ae94ae5daebd5f73ebacb3a9ce017
Changeset: http://git.rtems.org/rtems/commit/?id=82f5ec45e96ae94ae5daebd5f73ebacb3a9ce017
Author: Joel Sherrill <joel.sherrill at oarcorp.com>
Date: Mon Oct 20 11:31:41 2014 -0500
libcpu/sh/sh7045/sci/sci.c: Eliminate use of obsolete method
---
c/src/lib/libcpu/sh/sh7045/sci/sci.c | 32 +++++++++-----------------------
1 files changed, 9 insertions(+), 23 deletions(-)
diff --git a/c/src/lib/libcpu/sh/sh7045/sci/sci.c b/c/src/lib/libcpu/sh/sh7045/sci/sci.c
index e6c54e2..690035a 100644
--- a/c/src/lib/libcpu/sh/sh7045/sci/sci.c
+++ b/c/src/lib/libcpu/sh/sh7045/sci/sci.c
@@ -39,7 +39,7 @@
* by the authors or by TGA Technologies.
*/
-#include <rtems.h>
+#include <bsp.h>
#include <stdlib.h>
@@ -93,13 +93,6 @@ struct scidev_t {
static sci_setup_t sio_param[2];
#endif
-/* imported from scitab.rel */
-extern int _sci_get_brparms(
- tcflag_t cflag,
- unsigned char *smr,
- unsigned char *brr
-);
-
/* Translate termios' tcflag_t into sci settings */
static int _sci_set_cflags(
struct scidev_t *sci_dev,
@@ -291,7 +284,6 @@ rtems_device_driver sh_sci_initialize(
{
rtems_device_driver status;
rtems_device_minor_number i;
- rtems_driver_name_t driver;
/*
* register all possible devices.
@@ -301,23 +293,17 @@ rtems_device_driver sh_sci_initialize(
* initialization therefore we check it everytime
*/
for ( i = 0 ; i < SCI_MINOR_DEVICES ; i++ ) {
- status = rtems_io_lookup_name(
- sci_device[i].name,
- &driver);
- if ( status != RTEMS_SUCCESSFUL ) {
- /* OK. We assume it is not registered yet. */
- status = rtems_io_register_name(
- sci_device[i].name,
- major,
- sci_device[i].minor
- );
- if (status != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred(status);
- }
+ /* OK. We assume it is not registered yet. */
+ status = rtems_io_register_name(
+ sci_device[i].name,
+ major,
+ sci_device[i].minor
+ );
+ if (status != RTEMS_SUCCESSFUL)
+ rtems_fatal_error_occurred(status);
}
/* non-default hardware setup occurs in sh_sci_open() */
-
return RTEMS_SUCCESSFUL;
}
More information about the vc
mailing list