Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

orinoco: Remove ezusb_doicmd_wait()

ezusb_doicmd_wait() is invoked via ->init_cmd_wait() callback.
This callback is only invoked hermesi_program_init() and
hermesi_program_end() which are the ->program_init() and ->program_end()
callbacks as assigned by `hermes_ops_local'. They are never used by the
USB interface since the USB interface provides its own set of callbacks
by `ezusb_ops'.

Replace ezusb_doicmd_wait() with a warning in case I missed the obvious.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201113212252.2243570-9-bigeasy@linutronix.de

authored by

Sebastian Andrzej Siewior and committed by
Kalle Valo
47ab2a95 39628fe4

+2 -19
+2 -19
drivers/net/wireless/intersil/orinoco/orinoco_usb.c
··· 1052 1052 static int ezusb_doicmd_wait(struct hermes *hw, u16 cmd, u16 parm0, u16 parm1, 1053 1053 u16 parm2, struct hermes_response *resp) 1054 1054 { 1055 - struct ezusb_priv *upriv = hw->priv; 1056 - struct request_context *ctx; 1057 - 1058 - __le16 data[4] = { 1059 - cpu_to_le16(cmd), 1060 - cpu_to_le16(parm0), 1061 - cpu_to_le16(parm1), 1062 - cpu_to_le16(parm2), 1063 - }; 1064 - netdev_dbg(upriv->dev, 1065 - "0x%04X, parm0 0x%04X, parm1 0x%04X, parm2 0x%04X\n", cmd, 1066 - parm0, parm1, parm2); 1067 - ctx = ezusb_alloc_ctx(upriv, EZUSB_RID_DOCMD, EZUSB_RID_ACK); 1068 - if (!ctx) 1069 - return -ENOMEM; 1070 - 1071 - return ezusb_access_ltv(upriv, ctx, sizeof(data), &data, 1072 - EZUSB_FRAME_CONTROL, NULL, 0, NULL, 1073 - ezusb_req_ctx_wait); 1055 + WARN_ON_ONCE(1); 1056 + return -EINVAL; 1074 1057 } 1075 1058 1076 1059 static int __ezusb_docmd_wait(struct hermes *hw, u16 cmd, u16 parm0,