HomeFreeBSD

htu21: don't needlessly bother hardware when measurements are not needed

Description

htu21: don't needlessly bother hardware when measurements are not needed

sysctl(8) first queries a sysctl to get a size of its value even if the
sysctl is of a fixed size, e.g. it has an integer type.
Only after that sysctl(8) queries an actual value of the sysctl.

Previosuly the driver would needlessly read a sensor in the first step.

(cherry picked from commit 43b031a371eb90c15c390c26202f5f58d09300ef)

Details

Provenance
avgAuthored on Nov 6 2021, 4:47 PM
Parents
rGde5334c8c988: sockstat(1): Update Synopsis section
Branches
Unknown
Tags
Unknown