mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
leds: st1202: Correct the name of the prescaler conversion helper
st1202_prescalar_to_miliseconds() converts a duration in milliseconds into the prescaler value written to the pattern duration registers, so its name states the conversion the wrong way round. It also misspells both "prescaler" and "milliseconds". Rename it to st1202_milliseconds_to_prescaler(). No functional change. Signed-off-by: Manuel Fombuena <fombuena@outlook.com> Assisted-by: LLM Link: https://patch.msgid.link/GV1PR08MB8497AA602374777F1BA08E07C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
145ca6bca2
commit
226f325436
|
|
@ -85,7 +85,7 @@ static int st1202_write_reg(struct st1202_chip *chip, int reg, uint8_t val)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static uint8_t st1202_prescalar_to_miliseconds(unsigned int value)
|
||||
static uint8_t st1202_milliseconds_to_prescaler(unsigned int value)
|
||||
{
|
||||
return value / ST1202_MILLIS_PATTERN_DUR_MIN;
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ static int st1202_duration_pattern_write(struct st1202_chip *chip, int pattern,
|
|||
unsigned int value)
|
||||
{
|
||||
return st1202_write_reg(chip, (ST1202_PATTERN_DUR + pattern),
|
||||
st1202_prescalar_to_miliseconds(value));
|
||||
st1202_milliseconds_to_prescaler(value));
|
||||
}
|
||||
|
||||
static int __st1202_channel_set(struct st1202_chip *chip, int led_num, bool active)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user