source: rtems/cpukit/sapi/src/iounregisterdriver.c @ 9c556023

4.104.114.84.9
Last change on this file since 9c556023 was 9c556023, checked in by Joel Sherrill <joel.sherrill@…>, on May 29, 2007 at 7:56:35 PM

2007-05-29 Joel Sherrill <joel.sherrill@…>

  • sapi/Makefile.am, sapi/include/rtems/io.h, sapi/src/io.c: Split into one function per file execpt io.c which contains required initialization methods.
  • sapi/src/ioclose.c, sapi/src/iocontrol.c, sapi/src/iodata.c, sapi/src/ioinitialize.c, sapi/src/ioopen.c, sapi/src/ioread.c, sapi/src/ioregisterdriver.c, sapi/src/iounregisterdriver.c, sapi/src/iowrite.c: New files.
  • Property mode set to 100644
File size: 1016 bytes
Line 
1/*
2 *  Input/Output Manager - Dynamically Unregister Device Driver
3 *
4 *  COPYRIGHT (c) 1989-2007.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#if HAVE_CONFIG_H
15#include "config.h"
16#endif
17
18#include <rtems/system.h>
19#include <rtems/io.h>
20#include <string.h>
21
22/*
23 *  rtems_io_unregister_driver
24 *
25 *  Unregister a driver from the device driver table.
26 *
27 *  Input Paramters:
28 *    major            - device major number
29 *
30 *  Output Parameters:
31 *    RTEMS_SUCCESSFUL - if successful
32 *    error code       - if unsuccessful
33 */
34
35rtems_status_code rtems_io_unregister_driver(
36  rtems_device_major_number major
37)
38{
39  if ( major < _IO_Number_of_drivers ) {
40    memset(
41      &_IO_Driver_address_table[major],
42      0,
43      sizeof( rtems_driver_address_table )
44    );
45    return RTEMS_SUCCESSFUL;
46  }
47  return RTEMS_UNSATISFIED;
48}
Note: See TracBrowser for help on using the repository browser.