@@ -259,8 +259,12 @@ PARPORT_MAX_SPINTIME_VALUE;
struct parport_sysctl_table {
struct ctl_table_header *port_header;
struct ctl_table_header *devices_header;
- struct ctl_table vars[12];
- struct ctl_table device_dir[2];
+#ifdef CONFIG_PARPORT_1284
+ struct ctl_table vars[10];
+#else
+ struct ctl_table vars[5];
+#endif /* IEEE 1284 support */
+ struct ctl_table device_dir[1];
};
static const struct parport_sysctl_table parport_sysctl_template = {
@@ -303,9 +307,9 @@ static const struct parport_sysctl_table parport_sysctl_template = {
.maxlen = 0,
.mode = 0444,
.proc_handler = do_hardware_modes
- },
+ }
#ifdef CONFIG_PARPORT_1284
- {
+ , {
.procname = "autoprobe",
.data = NULL,
.maxlen = 0,
@@ -339,9 +343,8 @@ static const struct parport_sysctl_table parport_sysctl_template = {
.maxlen = 0,
.mode = 0444,
.proc_handler = do_autoprobe
- },
+ }
#endif /* IEEE 1284 support */
- {}
},
{
{
@@ -350,20 +353,15 @@ static const struct parport_sysctl_table parport_sysctl_template = {
.maxlen = 0,
.mode = 0444,
.proc_handler = do_active_device
- },
- {}
+ }
},
};
struct parport_device_sysctl_table
{
struct ctl_table_header *sysctl_header;
- struct ctl_table vars[2];
- struct ctl_table device_dir[2];
- struct ctl_table devices_root_dir[2];
- struct ctl_table port_dir[2];
- struct ctl_table parport_dir[2];
- struct ctl_table dev_dir[2];
+ struct ctl_table vars[1];
+ struct ctl_table device_dir[1];
};
static const struct parport_device_sysctl_table
@@ -378,8 +376,7 @@ parport_device_sysctl_template = {
.proc_handler = proc_doulongvec_ms_jiffies_minmax,
.extra1 = (void*) &parport_min_timeslice_value,
.extra2 = (void*) &parport_max_timeslice_value
- },
- {}
+ }
},
{
{
@@ -387,18 +384,14 @@ parport_device_sysctl_template = {
.data = NULL,
.maxlen = 0,
.mode = 0555,
- },
- {}
+ }
}
};
struct parport_default_sysctl_table
{
struct ctl_table_header *sysctl_header;
- struct ctl_table vars[3];
- struct ctl_table default_dir[2];
- struct ctl_table parport_dir[2];
- struct ctl_table dev_dir[2];
+ struct ctl_table vars[2];
};
static struct parport_default_sysctl_table
@@ -422,8 +415,7 @@ parport_default_sysctl_table = {
.proc_handler = proc_dointvec_minmax,
.extra1 = (void*) &parport_min_spintime_value,
.extra2 = (void*) &parport_max_spintime_value
- },
- {}
+ }
}
};
@@ -443,7 +435,9 @@ int parport_proc_register(struct parport *port)
t->vars[0].data = &port->spintime;
for (i = 0; i < 5; i++) {
t->vars[i].extra1 = port;
+#ifdef CONFIG_PARPORT_1284
t->vars[5 + i].extra2 = &port->probe_info[i];
+#endif /* IEEE 1284 support */
}
port_name_len = strnlen(port->name, PARPORT_NAME_MAX_LEN);