usb: mtu3: introduce a funtion to check maximum speed
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Mon, 27 Jul 2020 07:14:54 +0000 (15:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2020 14:53:58 +0000 (16:53 +0200)
commit1258450ef38af7ea5b27a0a14195bb406f59cda8
treedafb7d68ba7887a030f559478e1bb0bbffab808c
parentb7d5c3cabcec4191e22e962867904e661cb9bc84
usb: mtu3: introduce a funtion to check maximum speed

The max_speed got from DTS may be not supported by the
hardware, so need check it, and assign a proper default
value. And make it clear by introducing a funtion.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1595834101-13094-5-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mtu3/mtu3_core.c