When the fdt does not provide a list of brightness states, pwmbl(4)
authormiod <miod@openbsd.org>
Mon, 14 Nov 2022 07:22:44 +0000 (07:22 +0000)
committermiod <miod@openbsd.org>
Mon, 14 Nov 2022 07:22:44 +0000 (07:22 +0000)
commit04b807ce4968fe724738b0a41d109d9bad2fbb65
tree67adf57b706101ee9492f302df5bf6960306f138
parent53a69a909e7144bba9b0c7135a0bdf01e45b708f
When the fdt does not provide a list of brightness states, pwmbl(4)
builds a 256 state ramp (i.e. state[i] = i with 0 <= i < 256).

Change the logic to not need to malloc an array of values in this case,
since they are trivially known.

test&ok patrick@
sys/dev/fdt/pwmbl.c