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 <kramasub@google.com>
Change-Id: I79317da6d9c7cd177bd7bbbba1f1ccebe076930a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34245
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Karthikeyan Ramasubramanian 2019-07-11 12:23:35 -06:00 committed by Martin Roth
parent d06828da98
commit 19398245b4
1 changed files with 1 additions and 1 deletions

View File

@ -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 */