On Saturday, September 22, 2012 6:11 AM, Dan Carpenter wrote: > On Wed, Sep 19, 2012 at 03:12:54PM -0700, H Hartley Sweeten wrote: >> + case INSN_CONFIG_GPCT_PULSE_TRAIN_GENERATOR: >> /* data[0] contains the PULSE_WIDTH >> data[1] contains the PULSE_PERIOD >> @pre PULSE_PERIOD > PULSE_WIDTH > 0 >> The above periods must be expressed as a multiple of the >> pulse frequency on the selected source >> */ >> - if ((data[1] > data[0]) && (data[0] > 0)) { >> - devpriv->s526_gpct_config[chan].data[0] = data[0]; >> - devpriv->s526_gpct_config[chan].data[1] = data[1]; >> - } else { >> + if ((data[1] < data[0]) || !data[0]) > ^^^^^^^^^^^^^^^^^ > Should this be: > if ((data[1] <= data[0] ... > That would match the original code better. Oops.. Good catch. I just posted a patch to fix this. Thanks, Hartley _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel