mirror of https://gitee.com/openkylin/linux.git
usb: mtu3: remove repeated setting of speed
mtu3_gadget_start() will set speed, no need set it again in mtu3_gadget_set_speed(), just save the desired speed. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1622182260-23767-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
32ab701df6
commit
2c09bdaa58
|
@ -425,7 +425,6 @@ void mtu3_ep_stall_set(struct mtu3_ep *mep, bool set);
|
|||
void mtu3_start(struct mtu3 *mtu);
|
||||
void mtu3_stop(struct mtu3 *mtu);
|
||||
void mtu3_dev_on_off(struct mtu3 *mtu, int is_on);
|
||||
void mtu3_set_speed(struct mtu3 *mtu, enum usb_device_speed speed);
|
||||
|
||||
int mtu3_gadget_setup(struct mtu3 *mtu);
|
||||
void mtu3_gadget_cleanup(struct mtu3 *mtu);
|
||||
|
|
|
@ -207,7 +207,7 @@ static void mtu3_intr_enable(struct mtu3 *mtu)
|
|||
mtu3_writel(mbase, U3D_DEV_LINK_INTR_ENABLE, SSUSB_DEV_SPEED_CHG_INTR);
|
||||
}
|
||||
|
||||
void mtu3_set_speed(struct mtu3 *mtu, enum usb_device_speed speed)
|
||||
static void mtu3_set_speed(struct mtu3 *mtu, enum usb_device_speed speed)
|
||||
{
|
||||
void __iomem *mbase = mtu->mac_base;
|
||||
|
||||
|
|
|
@ -577,7 +577,7 @@ mtu3_gadget_set_speed(struct usb_gadget *g, enum usb_device_speed speed)
|
|||
dev_dbg(mtu->dev, "%s %s\n", __func__, usb_speed_string(speed));
|
||||
|
||||
spin_lock_irqsave(&mtu->lock, flags);
|
||||
mtu3_set_speed(mtu, speed);
|
||||
mtu->speed = speed;
|
||||
spin_unlock_irqrestore(&mtu->lock, flags);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue