From e77e4c40dd2894b56ea0aa9adee8be41d74b15b8 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 1 Nov 2021 03:29:53 +0000 Subject: [PATCH] use hw_power to implement power_supply_is_system_supplied() --- sys/dev/pci/drm/include/linux/power_supply.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.20.1