From 56cbb0d71f65c6ec529b9159289e9ed3d3dfc3a7 Mon Sep 17 00:00:00 2001 From: Jeevan Shriram Date: Tue, 13 Oct 2020 09:55:57 -0700 Subject: [PATCH] Revert "usb: typec: Fix setting of invalid value of opmode" This reverts commit 410f0c2b19a4e87b4a73dacb8f41eb06cb893143. Additional enum value in include header is causing CRC differences with GKI kernel. Change-Id: Ia27f4d217a6bb2e234f49cb93c4163f372f4bcd7 Signed-off-by: Jeevan Shriram --- drivers/usb/typec/class.c | 3 +-- include/linux/usb/typec.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c index 7ab5c5125212..91d62276b56f 100644 --- a/drivers/usb/typec/class.c +++ b/drivers/usb/typec/class.c @@ -1369,8 +1369,7 @@ void typec_set_pwr_opmode(struct typec_port *port, { struct device *partner_dev; - if ((port->pwr_opmode == opmode) || (opmode < TYPEC_PWR_MODE_USB) || - (opmode > TYPEC_PWR_MODE_MAX)) + if (port->pwr_opmode == opmode) return; port->pwr_opmode = opmode; diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h index 54563b881878..894798084319 100644 --- a/include/linux/usb/typec.h +++ b/include/linux/usb/typec.h @@ -53,7 +53,6 @@ enum typec_pwr_opmode { TYPEC_PWR_MODE_1_5A, TYPEC_PWR_MODE_3_0A, TYPEC_PWR_MODE_PD, - TYPEC_PWR_MODE_MAX = TYPEC_PWR_MODE_PD, }; enum typec_accessory {