From: Timi Rautamäki Date: Mon, 6 Dec 2021 18:00:27 +0000 (+0000) Subject: usb: typec: Fix enum conversion warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=40e93d5ea74f82bd3394b49d3d96e228793504fa;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git usb: typec: Fix enum conversion warning Change-Id: Id61b8673915551bfa6ce81058bea066312b16345 --- diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 977491c5a986..41c394e0c9bf 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -4638,7 +4638,7 @@ static int tcpm_psy_get_current_max(struct tcpm_port *port, if (port->pps_data.active) val->intval = port->pps_data.max_curr * 1000; else - val->intval = max(tcpm_get_max_fixed_current(port), + val->intval = max_t(size_t, tcpm_get_max_fixed_current(port), port->current_limit) * 1000; return 0;