use hw_power to implement power_supply_is_system_supplied()
authorjsg <jsg@openbsd.org>
Mon, 1 Nov 2021 03:29:53 +0000 (03:29 +0000)
committerjsg <jsg@openbsd.org>
Mon, 1 Nov 2021 03:29:53 +0000 (03:29 +0000)
sys/dev/pci/drm/include/linux/power_supply.h

index 20391f5..706363a 100644 (file)
@@ -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