]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Reverse the bit logic of sc_led_modes_mask. Instead of initializing it to
authorian <ian@FreeBSD.org>
Mon, 20 May 2019 22:32:31 +0000 (22:32 +0000)
committerian <ian@FreeBSD.org>
Mon, 20 May 2019 22:32:31 +0000 (22:32 +0000)
commitc2122bd8ae0f75f66a38bff4e5a4e5592ee3e21d
tree947f469d48dd7c4b2709b542ff6ab3c24c03df40
parente2fe1e7058592b57b05a53f993c9113775ea723e
Reverse the bit logic of sc_led_modes_mask.  Instead of initializing it to
all-ones then carving out blocks of zeroes where specified values go, init
it to all-zeroes, put in ones where values need to be masked, then use it
as value &= ~sc_led_modes_mask.  In addition to being more idiomatic, this
means everything related to FDT data is initialized to zero along with the
rest of the softc, and that allows removing some #ifdef FDT sections and
wrapping the whole muge_set_leds() function in a single ifdef block.

This also deletes the early-out from muge_set_leds() when an eeprom exists.
Even if there is an eeprom with led config in it, the fdt data (if present)
should override that, because the user is in control of the fdt data.
sys/dev/usb/net/if_muge.c