[PARPORT] Bug in parport_pc.c

From: Marcel Wijlaars (marcelw@wfw.wtb.tue.nl)
Date: Tue Oct 23 2001 - 02:40:31 EDT

  • Next message: Tim Waugh: "Re: [PARPORT] Bug in parport_pc.c (2.2.x)"

    Hello,

    I've been trying to make the parport_cs kernel module work with the 2.4
    series kernel and came across a problem in the parport_pc.c file.

    In the 2.2 kernel series check_region, request_region and other
    functions like it are declared as functions returning void.
    In the 2.4 kernel series these functions return a pointer value so that
    an error can be signaled, if a NULL pointer is returned the check or
    request failed.

    In the parport_pc.c file the parport_pc_probe_port function does a "if (
    check_region(base,3) ) return NULL;" which I think should be "if (
    !check_region(base,3) ) return NULL;"

    If I apply this crude hack to parport_pc.c and modify parport_cs.c so it
    known there are only 3 parport modes (compared to 5 in the 2.2 kernel
    series) the pcmcia parport module works just fine

    The way I have to implement this patch is so ugly that I thing this
    problem might affect other parport function.

    any comments are welcome,

     
    * Marcel Wijlaars *
    Eindhoven University of Technology
    Mechanical Engineering
    Materials Technology
    PO Box 513 ,WH 4.111
    5600 MB Eindhoven, The Netherlands

    Tel: +31 40 247 4813
    Fax: +31 40 244 7355
    Email: marcelw@wfw.wtb.tue.nl
    <mailto:marcelw@wfw.wtb.tue.nl>

    -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Tue Oct 23 2001 - 02:40:41 EDT