usb: typec: Fix enum conversion warning
authorTimi Rautamäki <timi.rautamaki@gmail.com>
Mon, 6 Dec 2021 18:00:27 +0000 (18:00 +0000)
committerChristian Hoffmann <chrmhoffmann@gmail.com>
Sun, 12 Feb 2023 08:13:15 +0000 (09:13 +0100)
Change-Id: Id61b8673915551bfa6ce81058bea066312b16345

drivers/usb/typec/tcpm.c

index 977491c5a986a1b4dcb33dcf01ec2886c7caebff..41c394e0c9bfa433ed03e96b3c1a6d1f7e4f1cfd 100644 (file)
@@ -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;