Commit a428a69e authored by Art Haas's avatar Art Haas Committed by Linus Torvalds

[PATCH] C99 initializers for drivers/net/arlan-proc.c

parent 948bc323
...@@ -816,14 +816,18 @@ static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp, ...@@ -816,14 +816,18 @@ static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp,
/* Place files in /proc/sys/dev/arlan */ /* Place files in /proc/sys/dev/arlan */
#define CTBLN(num,card,nam) \ #define CTBLN(num,card,nam) \
{num , #nam, &(arlan_conf[card].nam), \ { .ctl_name = num,\
sizeof(int), 0600, NULL, &proc_dointvec} .procname = #nam,\
.data = &(arlan_conf[card].nam),\
.maxlen = sizeof(int), .mode = 0600, .proc_handler = &proc_dointvec}
#ifdef ARLAN_DEBUGGING #ifdef ARLAN_DEBUGGING
#define ARLAN_PROC_DEBUG_ENTRIES {48, "entry_exit_debug", &arlan_entry_and_exit_debug, \ #define ARLAN_PROC_DEBUG_ENTRIES \
sizeof(int), 0600, NULL, &proc_dointvec},\ { .ctl_name = 48, .procname = "entry_exit_debug",\
{49, "debug", &arlan_debug, \ .data = &arlan_entry_and_exit_debug,\
sizeof(int), 0600, NULL, &proc_dointvec}, .maxlen = sizeof(int), .mode = 0600, .proc_handler = &proc_dointvec},\
{ .ctl_name = 49, .procname = "debug", .data = &arlan_debug,\
.maxlen = sizeof(int), .mode = 0600, .proc_handler = &proc_dointvec},
#else #else
#define ARLAN_PROC_DEBUG_ENTRIES #define ARLAN_PROC_DEBUG_ENTRIES
#endif #endif
...@@ -858,8 +862,9 @@ static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp, ...@@ -858,8 +862,9 @@ static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp,
CTBLN(27,cardNo, txTimeoutMs),\ CTBLN(27,cardNo, txTimeoutMs),\
CTBLN(28,cardNo, waitCardTimeout),\ CTBLN(28,cardNo, waitCardTimeout),\
CTBLN(29,cardNo, channelSet), \ CTBLN(29,cardNo, channelSet), \
{30, "name", arlan_conf[cardNo].siteName, \ {.ctl_name = 30, .procname = "name",\
16, 0600, NULL, &proc_dostring},\ .data = arlan_conf[cardNo].siteName,\
.maxlen = 16, .mode = 0600, .proc_handler = &proc_dostring},\
CTBLN(31,cardNo,waitTime),\ CTBLN(31,cardNo,waitTime),\
CTBLN(32,cardNo,lParameter),\ CTBLN(32,cardNo,lParameter),\
CTBLN(33,cardNo,_15),\ CTBLN(33,cardNo,_15),\
...@@ -897,22 +902,64 @@ static ctl_table arlan_conf_table0[] = ...@@ -897,22 +902,64 @@ static ctl_table arlan_conf_table0[] =
ARLAN_SYSCTL_TABLE_TOTAL(0) ARLAN_SYSCTL_TABLE_TOTAL(0)
#ifdef ARLAN_PROC_SHM_DUMP #ifdef ARLAN_PROC_SHM_DUMP
{150, "arlan0-txRing", &arlan_drive_info, {
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_infotxRing}, .ctl_name = 150,
{151, "arlan0-rxRing", &arlan_drive_info, .procname = "arlan0-txRing",
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_inforxRing}, .data = &arlan_drive_info,
{152, "arlan0-18", &arlan_drive_info, .maxlen = ARLAN_STR_SIZE,
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_info18}, .mode = 0400,
{153, "arlan0-ring", &arlan_drive_info, .proc_handler = &arlan_sysctl_infotxRing,
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_info161719}, },
{154, "arlan0-shm-cpy", &arlan_drive_info, {
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_info}, .ctl_name = 151,
.procname = "arlan0-rxRing",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_inforxRing,
},
{
.ctl_name = 152,
.procname = "arlan0-18",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_info18,
},
{
.ctl_name = 153,
.procname = "arlan0-ring",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_info161719,
},
{
.ctl_name = 154,
.procname = "arlan0-shm-cpy",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_info,
},
#endif #endif
{155, "config0", &conf_reset_result, \ {
100, 0400, NULL, &arlan_configure}, \ .ctl_name = 155,
{156, "reset0", &conf_reset_result, \ .procname = "config0",
100, 0400, NULL, &arlan_sysctl_reset}, \ .data = &conf_reset_result,
{0} .maxlen = 100,
.mode = 0400,
.proc_handler = &arlan_configure
},
{
.ctl_name = 156,
.procname = "reset0",
.data = &conf_reset_result,
.maxlen = 100,
.mode = 0400,
.proc_handler = &arlan_sysctl_reset,
},
{ .ctl_name = 0 }
}; };
static ctl_table arlan_conf_table1[] = static ctl_table arlan_conf_table1[] =
...@@ -921,22 +968,64 @@ static ctl_table arlan_conf_table1[] = ...@@ -921,22 +968,64 @@ static ctl_table arlan_conf_table1[] =
ARLAN_SYSCTL_TABLE_TOTAL(1) ARLAN_SYSCTL_TABLE_TOTAL(1)
#ifdef ARLAN_PROC_SHM_DUMP #ifdef ARLAN_PROC_SHM_DUMP
{150, "arlan1-txRing", &arlan_drive_info, {
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_infotxRing}, .ctl_name = 150,
{151, "arlan1-rxRing", &arlan_drive_info, .procname = "arlan1-txRing",
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_inforxRing}, .data = &arlan_drive_info,
{152, "arlan1-18", &arlan_drive_info, .maxlen = ARLAN_STR_SIZE,
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_info18}, .mode = 0400,
{153, "arlan1-ring", &arlan_drive_info, .proc_handler = &arlan_sysctl_infotxRing,
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_info161719}, },
{154, "arlan1-shm-cpy", &arlan_drive_info, {
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_info}, .ctl_name = 151,
.procname = "arlan1-rxRing",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_inforxRing,
},
{
.ctl_name = 152,
.procname = "arlan1-18",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_info18,
},
{
.ctl_name = 153,
.procname = "arlan1-ring",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_info161719,
},
{
.ctl_name = 154,
.procname = "arlan1-shm-cpy",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_info,
},
#endif #endif
{155, "config1", &conf_reset_result, {
100, 0400, NULL, &arlan_configure}, .ctl_name = 155,
{156, "reset1", &conf_reset_result, .procname = "config1",
100, 0400, NULL, &arlan_sysctl_reset}, .data = &conf_reset_result,
{0} .maxlen = 100,
.mode = 0400,
.proc_handler = &arlan_configure,
},
{
.ctl_name = 156,
.procname = "reset1",
.data = &conf_reset_result,
.maxlen = 100,
.mode = 0400,
.proc_handler = &arlan_sysctl_reset,
},
{ .ctl_name = 0 }
}; };
static ctl_table arlan_conf_table2[] = static ctl_table arlan_conf_table2[] =
...@@ -945,22 +1034,64 @@ static ctl_table arlan_conf_table2[] = ...@@ -945,22 +1034,64 @@ static ctl_table arlan_conf_table2[] =
ARLAN_SYSCTL_TABLE_TOTAL(2) ARLAN_SYSCTL_TABLE_TOTAL(2)
#ifdef ARLAN_PROC_SHM_DUMP #ifdef ARLAN_PROC_SHM_DUMP
{150, "arlan2-txRing", &arlan_drive_info, {
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_infotxRing}, .ctl_name = 150,
{151, "arlan2-rxRing", &arlan_drive_info, .procname = "arlan2-txRing",
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_inforxRing}, .data = &arlan_drive_info,
{152, "arlan2-18", &arlan_drive_info, .maxlen = ARLAN_STR_SIZE,
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_info18}, .mode = 0400,
{153, "arlan2-ring", &arlan_drive_info, .proc_handler = &arlan_sysctl_infotxRing,
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_info161719}, },
{154, "arlan2-shm-cpy", &arlan_drive_info, {
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_info}, .ctl_name = 151,
.procname = "arlan2-rxRing",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_inforxRing,
},
{
.ctl_name = 152,
.procname = "arlan2-18",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_info18,
},
{
.ctl_name = 153,
.procname = "arlan2-ring",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_info161719,
},
{
.ctl_name = 154,
.procname = "arlan2-shm-cpy",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_info,
},
#endif #endif
{155, "config2", &conf_reset_result, {
100, 0400, NULL, &arlan_configure}, .ctl_name = 155,
{156, "reset2", &conf_reset_result, .procname = "config2",
100, 0400, NULL, &arlan_sysctl_reset}, .data = &conf_reset_result,
{0} .maxlen = 100,
.mode = 0400,
.proc_handler = &arlan_configure,
},
{
.ctl_name = 156,
.procname = "reset2",
.data = &conf_reset_result,
.maxlen = 100,
.mode = 0400,
.proc_handler = &arlan_sysctl_reset,
},
{ .ctl_name = 0 }
}; };
static ctl_table arlan_conf_table3[] = static ctl_table arlan_conf_table3[] =
...@@ -969,47 +1100,113 @@ static ctl_table arlan_conf_table3[] = ...@@ -969,47 +1100,113 @@ static ctl_table arlan_conf_table3[] =
ARLAN_SYSCTL_TABLE_TOTAL(3) ARLAN_SYSCTL_TABLE_TOTAL(3)
#ifdef ARLAN_PROC_SHM_DUMP #ifdef ARLAN_PROC_SHM_DUMP
{150, "arlan3-txRing", &arlan_drive_info, {
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_infotxRing}, .ctl_name = 150,
{151, "arlan3-rxRing", &arlan_drive_info, .procname = "arlan3-txRing",
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_inforxRing}, .data = &arlan_drive_info,
{152, "arlan3-18", &arlan_drive_info, .maxlen = ARLAN_STR_SIZE,
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_info18}, .mode = 0400,
{153, "arlan3-ring", &arlan_drive_info, .proc_handler = &arlan_sysctl_infotxRing,
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_info161719}, },
{154, "arlan3-shm-cpy", &arlan_drive_info, {
ARLAN_STR_SIZE, 0400, NULL, &arlan_sysctl_info}, .ctl_name = 151,
.procname = "arlan3-rxRing",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_inforxRing,
},
{
.ctl_name = 152,
.procname = "arlan3-18",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_info18,
},
{
.ctl_name = 153,
.procname = "arlan3-ring",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_info161719,
},
{
.ctl_name = 154,
.procname = "arlan3-shm-cpy",
.data = &arlan_drive_info,
.maxlen = ARLAN_STR_SIZE,
.mode = 0400,
.proc_handler = &arlan_sysctl_info,
},
#endif #endif
{155, "config3", &conf_reset_result, {
100, 0400, NULL, &arlan_configure}, .ctl_name = 155,
{156, "reset3", &conf_reset_result, .procname = "config3",
100, 0400, NULL, &arlan_sysctl_reset}, .data = &conf_reset_result,
{0} .maxlen = 100,
.mode = 0400,
.proc_handler = &arlan_configure,
},
{
.ctl_name = 156,
.procname = "reset3",
.data = &conf_reset_result,
.maxlen = 100,
.mode = 0400,
.proc_handler = &arlan_sysctl_reset,
},
{ .ctl_name = 0 }
}; };
static ctl_table arlan_table[] = static ctl_table arlan_table[] =
{ {
{0, "arlan0", NULL, 0, 0600, arlan_conf_table0}, {
{0, "arlan1", NULL, 0, 0600, arlan_conf_table1}, .ctl_name = 0,
{0, "arlan2", NULL, 0, 0600, arlan_conf_table2}, .procname = "arlan0",
{0, "arlan3", NULL, 0, 0600, arlan_conf_table3}, .maxlen = 0,
{0} .mode = 0600,
.child = arlan_conf_table0,
},
{
.ctl_name = 0,
.procname = "arlan1",
.maxlen = 0,
.mode = 0600,
.child = arlan_conf_table1,
},
{
.ctl_name = 0,
.procname = "arlan2",
.maxlen = 0,
.mode = 0600,
.child = arlan_conf_table2,
},
{
.ctl_name = 0,
.procname = "arlan3",
.maxlen = 0,
.mode = 0600,
.child = arlan_conf_table3,
},
{ .ctl_name = 0 }
}; };
#else #else
static ctl_table arlan_table[MAX_ARLANS + 1] = static ctl_table arlan_table[MAX_ARLANS + 1] =
{ {
{0} { .ctl_name = 0 }
}; };
#endif #endif
#else #else
static ctl_table arlan_table[MAX_ARLANS + 1] = static ctl_table arlan_table[MAX_ARLANS + 1] =
{ {
{0} { .ctl_name = 0 }
}; };
#endif #endif
...@@ -1018,8 +1215,14 @@ static ctl_table arlan_table[MAX_ARLANS + 1] = ...@@ -1018,8 +1215,14 @@ static ctl_table arlan_table[MAX_ARLANS + 1] =
static ctl_table arlan_root_table[] = static ctl_table arlan_root_table[] =
{ {
{254, "arlan", NULL, 0, 0555, arlan_table}, {
{0} .ctl_name = 254,
.procname = "arlan",
.maxlen = 0,
.mode = 0555,
.child = arlan_table,
},
{ .ctl_name = 0 }
}; };
/* Make sure that /proc/sys/dev is there */ /* Make sure that /proc/sys/dev is there */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment