Whamcloud - gitweb
LU-8648 all: remove all Sun license and URL references
[fs/lustre-release.git] / libcfs / libcfs / linux / linux-tracefile.c
index 294a34e..38edb50 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -49,7 +45,7 @@ static unsigned int pages_factor[CFS_TCD_TYPE_MAX] = {
 
 char *cfs_trace_console_buffers[NR_CPUS][CFS_TCD_TYPE_MAX];
 
-struct rw_semaphore cfs_tracefile_sem;
+static DECLARE_RWSEM(cfs_tracefile_sem);
 
 int cfs_tracefile_init_arch()
 {
@@ -57,8 +53,6 @@ int cfs_tracefile_init_arch()
        int    j;
        struct cfs_trace_cpu_data *tcd;
 
-       init_rwsem(&cfs_tracefile_sem);
-
        /* initialize trace_data */
        memset(cfs_trace_data, 0, sizeof(cfs_trace_data));
        for (i = 0; i < CFS_TCD_TYPE_MAX; i++) {
@@ -112,8 +106,6 @@ void cfs_tracefile_fini_arch()
                kfree(cfs_trace_data[i]);
                cfs_trace_data[i] = NULL;
        }
-
-       fini_rwsem(&cfs_tracefile_sem);
 }
 
 void cfs_tracefile_read_lock()
@@ -136,7 +128,7 @@ void cfs_tracefile_write_unlock()
        up_write(&cfs_tracefile_sem);
 }
 
-cfs_trace_buf_type_t cfs_trace_buf_idx_get()
+enum cfs_trace_buf_type cfs_trace_buf_idx_get()
 {
        if (in_irq())
                return CFS_TCD_TYPE_IRQ;