UPSTREAM: lenovo/x60: Fetch 16 bits when trying to parse bit 13

I'm not sure if that's the right fix here, but assuming the bit mask is
right, the inb is wrong.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1229556
Reviewed-on: https://review.coreboot.org/16026
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>

Change-Id: I7e33019af088780a09be12513200bec63734bf97
Reviewed-on: https://chromium-review.googlesource.com/368029
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Patrick Georgi 2016-08-02 14:28:49 +02:00 committed by chrome-bot
commit 4764340c98

View file

@ -255,7 +255,7 @@ void dock_disconnect(void)
int dock_present(void)
{
return !((inb(DEFAULT_GPIOBASE + 0x0c) >> 13) & 1);
return !((inw(DEFAULT_GPIOBASE + 0x0c) >> 13) & 1);
}
int dock_ultrabay_device_present(void)