leds: st1202: Use u8 consistently for 8-bit values

The driver spells 8-bit unsigned values both as uint8_t and as u8, a
mix present since the driver was added. The register helpers and the
prescaler conversion use uint8_t, while the rest of the driver uses u8,
which is also the preferred type in kernel code.

Convert the remaining uint8_t uses to u8.

No functional change.

Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: LLM
Link: https://patch.msgid.link/GV1PR08MB8497783FB573CD48491F9648C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
Manuel Fombuena 2026-09-15 13:43:58 +01:00 committed by Lee Jones
parent 0aed225f40
commit 38f98583bc

View File

@ -59,7 +59,7 @@ static struct st1202_led *cdev_to_st1202_led(struct led_classdev *cdev)
return container_of(cdev, struct st1202_led, led_cdev);
}
static int st1202_read_reg(struct st1202_chip *chip, int reg, uint8_t *val)
static int st1202_read_reg(struct st1202_chip *chip, int reg, u8 *val)
{
struct device *dev = &chip->client->dev;
int ret;
@ -70,11 +70,11 @@ static int st1202_read_reg(struct st1202_chip *chip, int reg, uint8_t *val)
return ret;
}
*val = (uint8_t)ret;
*val = (u8)ret;
return 0;
}
static int st1202_write_reg(struct st1202_chip *chip, int reg, uint8_t val)
static int st1202_write_reg(struct st1202_chip *chip, int reg, u8 val)
{
struct device *dev = &chip->client->dev;
int ret;
@ -86,7 +86,7 @@ static int st1202_write_reg(struct st1202_chip *chip, int reg, uint8_t val)
return ret;
}
static uint8_t st1202_milliseconds_to_prescaler(unsigned int value)
static u8 st1202_milliseconds_to_prescaler(unsigned int value)
{
return value / ST1202_MILLIS_PATTERN_DUR_MIN;
}