]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/irda/irsysctl.c
Convert files to UTF-8 and some cleanups
[net-next-2.6.git] / net / irda / irsysctl.c
index 86805c3d8324a0d6ae158292e55139d110ec9920..565cbf0421cd69124e372aa9274ef9a43b3da393 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************************
- *                
+ *
  * Filename:      irsysctl.c
  * Version:       1.0
  * Description:   Sysctl interface for IrDA
@@ -8,19 +8,19 @@
  * Created at:    Sun May 24 22:12:06 1998
  * Modified at:   Fri Jun  4 02:50:15 1999
  * Modified by:   Dag Brattli <dagb@cs.uit.no>
- * 
+ *
  *     Copyright (c) 1997, 1999 Dag Brattli, All Rights Reserved.
  *     Copyright (c) 2000-2001 Jean Tourrilhes <jt@hpl.hp.com>
- *      
- *     This program is free software; you can redistribute it and/or 
- *     modify it under the terms of the GNU General Public License as 
- *     published by the Free Software Foundation; either version 2 of 
+ *
+ *     This program is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of
  *     the License, or (at your option) any later version.
- *  
- *     Neither Dag Brattli nor University of Troms admit liability nor
- *     provide warranty for any of this software. This material is 
+ *
+ *     Neither Dag Brattli nor University of TromsΓΈ admit liability nor
+ *     provide warranty for any of this software. This material is
  *     provided "AS-IS" and at no charge.
- *     
+ *
  ********************************************************************/
 
 #include <linux/mm.h>
 #include <net/irda/irda.h>             /* irda_debug */
 #include <net/irda/irias_object.h>
 
-#define NET_IRDA 412 /* Random number */
-enum { DISCOVERY=1, DEVNAME, DEBUG, FAST_POLL, DISCOVERY_SLOTS,
-       DISCOVERY_TIMEOUT, SLOT_TIMEOUT, MAX_BAUD_RATE, MIN_TX_TURN_TIME,
-       MAX_TX_DATA_SIZE, MAX_TX_WINDOW, MAX_NOREPLY_TIME, WARN_NOREPLY_TIME,
-       LAP_KEEPALIVE_TIME };
-
 extern int  sysctl_discovery;
 extern int  sysctl_discovery_slots;
 extern int  sysctl_discovery_timeout;
@@ -94,7 +88,7 @@ static int do_devname(ctl_table *table, int write, struct file *filp,
 /* One file */
 static ctl_table irda_table[] = {
        {
-               .ctl_name       = DISCOVERY,
+               .ctl_name       = NET_IRDA_DISCOVERY,
                .procname       = "discovery",
                .data           = &sysctl_discovery,
                .maxlen         = sizeof(int),
@@ -102,7 +96,7 @@ static ctl_table irda_table[] = {
                .proc_handler   = &proc_dointvec
        },
        {
-               .ctl_name       = DEVNAME,
+               .ctl_name       = NET_IRDA_DEVNAME,
                .procname       = "devname",
                .data           = sysctl_devname,
                .maxlen         = 65,
@@ -111,8 +105,8 @@ static ctl_table irda_table[] = {
                .strategy       = &sysctl_string
        },
 #ifdef CONFIG_IRDA_DEBUG
-        {
-               .ctl_name       = DEBUG,
+       {
+               .ctl_name       = NET_IRDA_DEBUG,
                .procname       = "debug",
                .data           = &irda_debug,
                .maxlen         = sizeof(int),
@@ -121,8 +115,8 @@ static ctl_table irda_table[] = {
        },
 #endif
 #ifdef CONFIG_IRDA_FAST_RR
-        {
-               .ctl_name       = FAST_POLL,
+       {
+               .ctl_name       = NET_IRDA_FAST_POLL,
                .procname       = "fast_poll_increase",
                .data           = &sysctl_fast_poll_increase,
                .maxlen         = sizeof(int),
@@ -131,7 +125,7 @@ static ctl_table irda_table[] = {
        },
 #endif
        {
-               .ctl_name       = DISCOVERY_SLOTS,
+               .ctl_name       = NET_IRDA_DISCOVERY_SLOTS,
                .procname       = "discovery_slots",
                .data           = &sysctl_discovery_slots,
                .maxlen         = sizeof(int),
@@ -142,7 +136,7 @@ static ctl_table irda_table[] = {
                .extra2         = &max_discovery_slots
        },
        {
-               .ctl_name       = DISCOVERY_TIMEOUT,
+               .ctl_name       = NET_IRDA_DISCOVERY_TIMEOUT,
                .procname       = "discovery_timeout",
                .data           = &sysctl_discovery_timeout,
                .maxlen         = sizeof(int),
@@ -150,7 +144,7 @@ static ctl_table irda_table[] = {
                .proc_handler   = &proc_dointvec
        },
        {
-               .ctl_name       = SLOT_TIMEOUT,
+               .ctl_name       = NET_IRDA_SLOT_TIMEOUT,
                .procname       = "slot_timeout",
                .data           = &sysctl_slot_timeout,
                .maxlen         = sizeof(int),
@@ -161,7 +155,7 @@ static ctl_table irda_table[] = {
                .extra2         = &max_slot_timeout
        },
        {
-               .ctl_name       = MAX_BAUD_RATE,
+               .ctl_name       = NET_IRDA_MAX_BAUD_RATE,
                .procname       = "max_baud_rate",
                .data           = &sysctl_max_baud_rate,
                .maxlen         = sizeof(int),
@@ -172,7 +166,7 @@ static ctl_table irda_table[] = {
                .extra2         = &max_max_baud_rate
        },
        {
-               .ctl_name       = MIN_TX_TURN_TIME,
+               .ctl_name       = NET_IRDA_MIN_TX_TURN_TIME,
                .procname       = "min_tx_turn_time",
                .data           = &sysctl_min_tx_turn_time,
                .maxlen         = sizeof(int),
@@ -183,7 +177,7 @@ static ctl_table irda_table[] = {
                .extra2         = &max_min_tx_turn_time
        },
        {
-               .ctl_name       = MAX_TX_DATA_SIZE,
+               .ctl_name       = NET_IRDA_MAX_TX_DATA_SIZE,
                .procname       = "max_tx_data_size",
                .data           = &sysctl_max_tx_data_size,
                .maxlen         = sizeof(int),
@@ -194,7 +188,7 @@ static ctl_table irda_table[] = {
                .extra2         = &max_max_tx_data_size
        },
        {
-               .ctl_name       = MAX_TX_WINDOW,
+               .ctl_name       = NET_IRDA_MAX_TX_WINDOW,
                .procname       = "max_tx_window",
                .data           = &sysctl_max_tx_window,
                .maxlen         = sizeof(int),
@@ -205,7 +199,7 @@ static ctl_table irda_table[] = {
                .extra2         = &max_max_tx_window
        },
        {
-               .ctl_name       = MAX_NOREPLY_TIME,
+               .ctl_name       = NET_IRDA_MAX_NOREPLY_TIME,
                .procname       = "max_noreply_time",
                .data           = &sysctl_max_noreply_time,
                .maxlen         = sizeof(int),
@@ -216,7 +210,7 @@ static ctl_table irda_table[] = {
                .extra2         = &max_max_noreply_time
        },
        {
-               .ctl_name       = WARN_NOREPLY_TIME,
+               .ctl_name       = NET_IRDA_WARN_NOREPLY_TIME,
                .procname       = "warn_noreply_time",
                .data           = &sysctl_warn_noreply_time,
                .maxlen         = sizeof(int),
@@ -227,7 +221,7 @@ static ctl_table irda_table[] = {
                .extra2         = &max_warn_noreply_time
        },
        {
-               .ctl_name       = LAP_KEEPALIVE_TIME,
+               .ctl_name       = NET_IRDA_LAP_KEEPALIVE_TIME,
                .procname       = "lap_keepalive_time",
                .data           = &sysctl_lap_keepalive_time,
                .maxlen         = sizeof(int),
@@ -274,7 +268,7 @@ static struct ctl_table_header *irda_table_header;
  */
 int __init irda_sysctl_register(void)
 {
-       irda_table_header = register_sysctl_table(irda_root_table, 0);
+       irda_table_header = register_sysctl_table(irda_root_table);
        if (!irda_table_header)
                return -ENOMEM;
 
@@ -287,7 +281,7 @@ int __init irda_sysctl_register(void)
  *    Unregister our sysctl interface
  *
  */
-void __exit irda_sysctl_unregister(void) 
+void irda_sysctl_unregister(void)
 {
        unregister_sysctl_table(irda_table_header);
 }