[PATCH 42/54] libcpu/powerpc/mpc5xx/clock/clock.c: Fix warnings

Joel Sherrill joel.sherrill at oarcorp.com
Mon Oct 13 15:37:26 UTC 2014


---
 c/src/lib/libcpu/powerpc/mpc5xx/clock/clock.c | 36 ++++++---------------------
 1 file changed, 7 insertions(+), 29 deletions(-)

diff --git a/c/src/lib/libcpu/powerpc/mpc5xx/clock/clock.c b/c/src/lib/libcpu/powerpc/mpc5xx/clock/clock.c
index 2b95bd6..c344271 100644
--- a/c/src/lib/libcpu/powerpc/mpc5xx/clock/clock.c
+++ b/c/src/lib/libcpu/powerpc/mpc5xx/clock/clock.c
@@ -1,9 +1,10 @@
-/* clock.c
+/*
  *
  *  This routine initializes the PIT on the MPC5xx.
  *  The tick frequency is specified by the bsp.
- *
- *
+ */
+
+/*
  *  MPC5xx port sponsored by Defence Research and Development Canada - Suffield
  *  Copyright (C) 2004, Real-Time Systems Inc. (querbach at realtime.bc.ca)
  *
@@ -55,13 +56,6 @@ extern uint32_t bsp_clicks_per_usec;
 void Clock_exit( void );
 
 /*
- * These are set by clock driver during its init
- */
-
-rtems_device_major_number rtems_clock_major = ~0;
-rtems_device_minor_number rtems_clock_minor;
-
-/*
  *  ISR Handler
  */
 rtems_isr Clock_isr(rtems_vector_number vector)
@@ -107,8 +101,7 @@ void clockOn(void* unused)
   usiu.piscrk = 0;
 }
 
-void
-clockOff(void* unused)
+void clockOff(void* unused)
 {
   /* disable PIT and PIT interrupts */
   usiu.piscrk = USIU_UNLOCK_KEY;
@@ -127,13 +120,12 @@ int clockIsOn(void* unused)
  * Called via atexit()
  * Remove the clock interrupt handler by setting handler to NULL
  */
-void
-Clock_exit(void)
+void Clock_exit(void)
 {
   (void) BSP_disconnect_clock_handler ();
 }
 
-void Install_clock(rtems_isr_entry clock_isr)
+static void Install_clock(rtems_isr_entry clock_isr)
 {
   Clock_driver_ticks = 0;
 
@@ -141,13 +133,6 @@ void Install_clock(rtems_isr_entry clock_isr)
   atexit(Clock_exit);
 }
 
-void
-ReInstall_clock(rtems_isr_entry new_clock_isr)
-{
-  BSP_connect_clock_handler (new_clock_isr);
-}
-
-
 rtems_device_driver Clock_initialize(
   rtems_device_major_number major,
   rtems_device_minor_number minor,
@@ -156,12 +141,5 @@ rtems_device_driver Clock_initialize(
 {
   Install_clock( Clock_isr );
 
-  /*
-   * make major/minor avail to others such as shared memory driver
-   */
-
-  rtems_clock_major = major;
-  rtems_clock_minor = minor;
-
   return RTEMS_SUCCESSFUL;
 }
-- 
1.9.3




More information about the devel mailing list