Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pwm: modify PWM_LOOKUP to initialize all struct pwm_lookup members

Now that PWM_LOOKUP is not used anymore, modify it to initialize all the
members of struct pwm_lookup.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>

authored by

Alexandre Belloni and committed by
Thierry Reding
42844029 fcb35506

+5 -2
+2 -1
Documentation/pwm.txt
··· 19 19 consumers to providers, as given in the following example: 20 20 21 21 static struct pwm_lookup board_pwm_lookup[] = { 22 - PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL), 22 + PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL, 23 + 50000, PWM_POLARITY_NORMAL), 23 24 }; 24 25 25 26 static void __init board_init(void)
+3 -1
include/linux/pwm.h
··· 278 278 enum pwm_polarity polarity; 279 279 }; 280 280 281 - #define PWM_LOOKUP(_provider, _index, _dev_id, _con_id) \ 281 + #define PWM_LOOKUP(_provider, _index, _dev_id, _con_id, _period, _polarity) \ 282 282 { \ 283 283 .provider = _provider, \ 284 284 .index = _index, \ 285 285 .dev_id = _dev_id, \ 286 286 .con_id = _con_id, \ 287 + .period = _period, \ 288 + .polarity = _polarity \ 287 289 } 288 290 289 291 #if IS_ENABLED(CONFIG_PWM)