From: jsg Date: Mon, 1 Nov 2021 03:29:53 +0000 (+0000) Subject: use hw_power to implement power_supply_is_system_supplied() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e77e4c40dd2894b56ea0aa9adee8be41d74b15b8;p=openbsd use hw_power to implement power_supply_is_system_supplied() --- diff --git a/sys/dev/pci/drm/include/linux/power_supply.h b/sys/dev/pci/drm/include/linux/power_supply.h index 20391f528ae..706363a2f6f 100644 --- a/sys/dev/pci/drm/include/linux/power_supply.h +++ b/sys/dev/pci/drm/include/linux/power_supply.h @@ -6,8 +6,8 @@ static inline int power_supply_is_system_supplied(void) { - /* XXX return 0 if on battery */ - return (1); + extern int hw_power; + return hw_power; } #endif