Commit 903c788c authored by Art Haas's avatar Art Haas Committed by David S. Miller

[PATCH] C99 initializers for net/irda/irsysctl.c

parent 85322863
...@@ -99,60 +99,175 @@ static int do_devname(ctl_table *table, int write, struct file *filp, ...@@ -99,60 +99,175 @@ static int do_devname(ctl_table *table, int write, struct file *filp,
/* One file */ /* One file */
static ctl_table irda_table[] = { static ctl_table irda_table[] = {
{ DISCOVERY, "discovery", &sysctl_discovery, {
sizeof(int), 0644, NULL, &proc_dointvec }, .ctl_name = DISCOVERY,
{ DEVNAME, "devname", sysctl_devname, .procname = "discovery",
65, 0644, NULL, &do_devname, &sysctl_string}, .data = &sysctl_discovery,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
{
.ctl_name = DEVNAME,
.procname = "devname",
.data = sysctl_devname,
.maxlen = 65,
.mode = 0644,
.proc_handler = &do_devname,
.strategy = &sysctl_string
},
#ifdef CONFIG_IRDA_DEBUG #ifdef CONFIG_IRDA_DEBUG
{ DEBUG, "debug", &irda_debug, {
sizeof(int), 0644, NULL, &proc_dointvec }, .ctl_name = DEBUG,
.procname = "debug",
.data = &irda_debug,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
#endif #endif
#ifdef CONFIG_IRDA_FAST_RR #ifdef CONFIG_IRDA_FAST_RR
{ FAST_POLL, "fast_poll_increase", &sysctl_fast_poll_increase, {
sizeof(int), 0644, NULL, &proc_dointvec }, .ctl_name = FAST_POLL,
.procname = "fast_poll_increase",
.data = &sysctl_fast_poll_increase,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
#endif #endif
{ DISCOVERY_SLOTS, "discovery_slots", &sysctl_discovery_slots, {
sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, .ctl_name = DISCOVERY_SLOTS,
NULL, &min_discovery_slots, &max_discovery_slots }, .procname = "discovery_slots",
{ DISCOVERY_TIMEOUT, "discovery_timeout", &sysctl_discovery_timeout, .data = &sysctl_discovery_slots,
sizeof(int), 0644, NULL, &proc_dointvec }, .maxlen = sizeof(int),
{ SLOT_TIMEOUT, "slot_timeout", &sysctl_slot_timeout, .mode = 0644,
sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, .proc_handler = &proc_dointvec_minmax,
NULL, &min_slot_timeout, &max_slot_timeout }, .strategy = &sysctl_intvec,
{ MAX_BAUD_RATE, "max_baud_rate", &sysctl_max_baud_rate, .extra1 = &min_discovery_slots,
sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, .extra2 = &max_discovery_slots
NULL, &min_max_baud_rate, &max_max_baud_rate }, },
{ MIN_TX_TURN_TIME, "min_tx_turn_time", &sysctl_min_tx_turn_time, {
sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, .ctl_name = DISCOVERY_TIMEOUT,
NULL, &min_min_tx_turn_time, &max_min_tx_turn_time }, .procname = "discovery_timeout",
{ MAX_TX_DATA_SIZE, "max_tx_data_size", &sysctl_max_tx_data_size, .data = &sysctl_discovery_timeout,
sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, .maxlen = sizeof(int),
NULL, &min_max_tx_data_size, &max_max_tx_data_size }, .mode = 0644,
{ MAX_TX_WINDOW, "max_tx_window", &sysctl_max_tx_window, .proc_handler = &proc_dointvec
sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, },
NULL, &min_max_tx_window, &max_max_tx_window }, {
{ MAX_NOREPLY_TIME, "max_noreply_time", &sysctl_max_noreply_time, .ctl_name = SLOT_TIMEOUT,
sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, .procname = "slot_timeout",
NULL, &min_max_noreply_time, &max_max_noreply_time }, .data = &sysctl_slot_timeout,
{ WARN_NOREPLY_TIME, "warn_noreply_time", &sysctl_warn_noreply_time, .maxlen = sizeof(int),
sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, .mode = 0644,
NULL, &min_warn_noreply_time, &max_warn_noreply_time }, .proc_handler = &proc_dointvec_minmax,
{ LAP_KEEPALIVE_TIME, "lap_keepalive_time", &sysctl_lap_keepalive_time, .strategy = &sysctl_intvec,
sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, .extra1 = &min_slot_timeout,
NULL, &min_lap_keepalive_time, &max_lap_keepalive_time }, .extra2 = &max_slot_timeout
{ 0 } },
{
.ctl_name = MAX_BAUD_RATE,
.procname = "max_baud_rate",
.data = &sysctl_max_baud_rate,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_max_baud_rate,
.extra2 = &max_max_baud_rate
},
{
.ctl_name = MIN_TX_TURN_TIME,
.procname = "min_tx_turn_time",
.data = &sysctl_min_tx_turn_time,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_min_tx_turn_time,
.extra2 = &max_min_tx_turn_time
},
{
.ctl_name = MAX_TX_DATA_SIZE,
.procname = "max_tx_data_size",
.data = &sysctl_max_tx_data_size,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_max_tx_data_size,
.extra2 = &max_max_tx_data_size
},
{
.ctl_name = MAX_TX_WINDOW,
.procname = "max_tx_window",
.data = &sysctl_max_tx_window,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_max_tx_window,
.extra2 = &max_max_tx_window
},
{
.ctl_name = MAX_NOREPLY_TIME,
.procname = "max_noreply_time",
.data = &sysctl_max_noreply_time,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_max_noreply_time,
.extra2 = &max_max_noreply_time
},
{
.ctl_name = WARN_NOREPLY_TIME,
.procname = "warn_noreply_time",
.data = &sysctl_warn_noreply_time,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_warn_noreply_time,
.extra2 = &max_warn_noreply_time
},
{
.ctl_name = LAP_KEEPALIVE_TIME,
.procname = "lap_keepalive_time",
.data = &sysctl_lap_keepalive_time,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_lap_keepalive_time,
.extra2 = &max_lap_keepalive_time
},
{ .ctl_name = 0 }
}; };
/* One directory */ /* One directory */
static ctl_table irda_net_table[] = { static ctl_table irda_net_table[] = {
{ NET_IRDA, "irda", NULL, 0, 0555, irda_table }, {
{ 0 } .ctl_name = NET_IRDA,
.procname = "irda",
.maxlen = 0,
.mode = 0555,
.child = irda_table
},
{ .ctl_name = 0 }
}; };
/* The parent directory */ /* The parent directory */
static ctl_table irda_root_table[] = { static ctl_table irda_root_table[] = {
{ CTL_NET, "net", NULL, 0, 0555, irda_net_table }, {
{ 0 } .ctl_name = CTL_NET,
.procname = "net",
.maxlen = 0,
.mode = 0555,
.child = irda_net_table
},
{ .ctl_name = 0 }
}; };
static struct ctl_table_header *irda_table_header; static struct ctl_table_header *irda_table_header;
......
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