From 19398245b498e2ced39f3828f804c94bb82e9a14 Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Thu, 11 Jul 2019 12:23:35 -0600 Subject: device/device_util: Fix encoding the USB device path USB device id does not get included because of the logical OR operation. Fix encoding the USB device path. BUG=None BRANCH=None TEST=Boot to ChromeOS. Signed-off-by: Karthikeyan Ramasubramanian Change-Id: I79317da6d9c7cd177bd7bbbba1f1ccebe076930a Reviewed-on: https://review.coreboot.org/c/coreboot/+/34245 Reviewed-by: Patrick Georgi Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/device/device_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/device') diff --git a/src/device/device_util.c b/src/device/device_util.c index 11954a1982..7ded1df435 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -145,7 +145,7 @@ u32 dev_path_encode(const struct device *dev) ret |= dev->path.spi.cs; break; case DEVICE_PATH_USB: - ret |= dev->path.usb.port_type << 8 || dev->path.usb.port_id; + ret |= dev->path.usb.port_type << 8 | dev->path.usb.port_id; break; case DEVICE_PATH_NONE: case DEVICE_PATH_MMIO: /* don't care */ -- cgit v1.2.3