lkml.org 
[lkml]   [2011]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 02/69] sysctl: parport: reorder .child assignments to simplify review
    Date
    Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
    ---
    drivers/parport/procfs.c | 14 ++++++++------
    1 files changed, 8 insertions(+), 6 deletions(-)

    diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
    index 89b8b71..edeb012 100644
    --- a/drivers/parport/procfs.c
    +++ b/drivers/parport/procfs.c
    @@ -437,16 +437,17 @@ int parport_proc_register(struct parport *port)
    t->vars[i].extra1 = port;

    t->vars[0].data = &port->spintime;
    - t->vars[5].child = t->device_dir;

    for (i = 0; i < 5; i++)
    t->vars[6 + i].extra2 = &port->probe_info[i];

    t->port_dir[0].procname = port->name;

    - t->port_dir[0].child = t->vars;
    - t->parport_dir[0].child = t->port_dir;
    t->dev_dir[0].child = t->parport_dir;
    + t->parport_dir[0].child = t->port_dir;
    + t->port_dir[0].child = t->vars;
    + t->vars[5].child = t->device_dir;
    + /* vars[5] = PARPORT_DEVICES_ROOT_DIR => .procname = 'devices' */

    t->sysctl_header = register_sysctl_table(t->dev_dir);
    if (t->sysctl_header == NULL) {
    @@ -478,14 +479,15 @@ int parport_device_proc_register(struct pardevice *device)
    return -ENOMEM;
    memcpy(t, &parport_device_sysctl_template, sizeof(*t));

    + t->port_dir[0].procname = port->name;
    + t->device_dir[0].procname = device->name;
    +
    t->dev_dir[0].child = t->parport_dir;
    t->parport_dir[0].child = t->port_dir;
    - t->port_dir[0].procname = port->name;
    t->port_dir[0].child = t->devices_root_dir;
    t->devices_root_dir[0].child = t->device_dir;
    -
    - t->device_dir[0].procname = device->name;
    t->device_dir[0].child = t->vars;
    +
    t->vars[0].data = &device->timeslice;

    t->sysctl_header = register_sysctl_table(t->dev_dir);
    --
    1.7.5.134.g1c08b


    \
     
     \ /
      Last update: 2011-05-01 03:53    [W:0.038 / U:2.132 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site