Re: [PATCH v2] leds: add new transient trigger for one shot timeractivation

From: Shuah Khan
Date: Thu Apr 26 2012 - 10:48:30 EST


On Thu, 2012-04-26 at 16:02 +1000, NeilBrown wrote:
> On Wed, 25 Apr 2012 11:42:38 -0600 Shuah Khan <shuahkhan@xxxxxxxxx> wrote:
>
> > There was a suggestion to change units to seconds similar to "safe_delay_show"
> > and "safe_delay_store" in drivers/md/md.c. safe_delay_show shows time in
> > seconds, however safe_delay_store still takes the value in msecs. This
> > sounded like an asymmetric interface.
>
> I don't think you read the code properly. "strict_strtoul_scaled" takes
> a number like "0.20" and scales it to an integer...
> (though your decision not to take that approach may still be justified).

My bad. Yes you are right. strict_strtoul_scaled() does do scaling. This
routine is currently defined in drivers/md/md.c. The right to do would
be to move this routine to where kstrtoul() is for general consumption.
Something I might take on as a separate task. :)

-- Shuah


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/