summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2019-01-07 17:08:20 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-05 22:29:11 +0200
commitbca74850eef920fc97a9750521a80623591699d2 (patch)
tree9e333ff805f52a772b1c2c4bf8ab736b91de9107 /lib
parent000b11690e185c956f8d730148782dd792a832f6 (diff)
ACPI / video: Refactor and fix dmi_is_desktop()
[ Upstream commit cecf3e3e0803462335e25d083345682518097334 ] This commit refactors the chassis-type detection introduced by commit 53fa1f6e8a59 ("ACPI / video: Only default only_lcd to true on Win8-ready _desktops_") (where desktop means anything without a builtin screen). The DMI chassis_type is an unsigned integer, so rather then doing a whole bunch of string-compares on it, convert it to an int and feed the result to a switch case. Note the switch case uses hex values, this is done because the spec uses hex values too. This changes the check for "Main Server Chassis" from checking for 11 decimal to 11 hexadecimal, this is a bug fix, the original check for 11 decimal was wrong. Fixes: 53fa1f6e8a59 ("ACPI / video: Only default only_lcd to true ...") Signed-off-by: Hans de Goede <hdegoede@redhat.com> [ rjw: Drop redundant return statements ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions