hardware/x86power
Revisión | 50520a07ad50e005516a408a6d2b44163585cedc (tree) |
---|---|
Tiempo | 2017-05-23 11:02:48 |
Autor | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Simplify property_get to property_get_bool
@@ -57,7 +57,7 @@ static void power_init(struct power_module *module UNUSED) | ||
57 | 57 | static void power_set_interactive(struct power_module *module UNUSED, int on) |
58 | 58 | { |
59 | 59 | char mod[PROPERTY_VALUE_MAX]; |
60 | - if ((!property_get("wlan.no-unload-driver", mod, NULL) || strcmp(mod, "1")) | |
60 | + if (!property_get_bool("wlan.no-unload-driver", 0) | |
61 | 61 | && property_get("wlan.modname", mod, NULL)) { |
62 | 62 | if (on) { |
63 | 63 | if (insmod_by_dep(mod, "", NULL, 0, NULL)) { |