Skip to content

Commit 45066c4

Browse files
bobisnooblag-linaro
authored andcommitted
leds: ncp5623: Add MS suffix to time defines
To make the time macro defines clearer, add MS as a suffix. Signed-off-by: Abdel Alkuor <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 7b7e50f commit 45066c4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/leds/rgb/leds-ncp5623.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#define NCP5623_DIMMING_TIME_REG NCP5623_REG(0x7)
2323

2424
#define NCP5623_MAX_BRIGHTNESS 0x1f
25-
#define NCP5623_MAX_DIM_TIME 240 /* ms */
26-
#define NCP5623_DIM_STEP 8 /* ms */
25+
#define NCP5623_MAX_DIM_TIME_MS 240
26+
#define NCP5623_DIM_STEP_MS 8
2727

2828
struct ncp5623 {
2929
struct i2c_client *client;
@@ -92,8 +92,8 @@ static int ncp5623_pattern_set(struct led_classdev *cdev,
9292

9393
ncp->delay = 0;
9494

95-
if (pattern[0].delta_t > NCP5623_MAX_DIM_TIME ||
96-
(pattern[0].delta_t % NCP5623_DIM_STEP) != 0)
95+
if (pattern[0].delta_t > NCP5623_MAX_DIM_TIME_MS ||
96+
(pattern[0].delta_t % NCP5623_DIM_STEP_MS) != 0)
9797
return -EINVAL;
9898

9999
brightness_diff = pattern[0].brightness - ncp->current_brightness;
@@ -117,7 +117,7 @@ static int ncp5623_pattern_set(struct led_classdev *cdev,
117117

118118
ret = ncp5623_write(ncp->client,
119119
NCP5623_DIMMING_TIME_REG,
120-
pattern[0].delta_t / NCP5623_DIM_STEP);
120+
pattern[0].delta_t / NCP5623_DIM_STEP_MS);
121121
if (ret)
122122
return ret;
123123

0 commit comments

Comments
 (0)