]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: asus-wmi: Refactor disable_gpu attribute
authorLuke D. Jones <luke@ljones.dev>
Fri, 12 Aug 2022 22:25:07 +0000 (10:25 +1200)
committerHans de Goede <hdegoede@redhat.com>
Thu, 25 Aug 2022 14:23:53 +0000 (16:23 +0200)
commitc37e0c50955f0ee1522e3b54db73161594d1ac58
tree480df031bf52afad90f83b186c1450af2b194060
parentd43cc938e12e323c8c4094df1f312f20b426e01a
platform/x86: asus-wmi: Refactor disable_gpu attribute

The settings for these attributes can be read from the device, this
is now done instead of reading a stored value from module. The stored
value is also removed.

This means the simpler asus_wmi_dev_is_present() can be used in
*_check_present() - it is not an error for these methods to be
missing.

The _write() functions have their bodies shifted in to *_store()
which simplifies things further.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20220812222509.292692-5-luke@ljones.dev
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/asus-wmi.c