ANDROID: usb: gadget: Add missing inline qualifier to stub functions
When CONFIG_USB_GADGET is disabled:
In file included from drivers/usb/dwc2/core_intr.c:54:
In file included from drivers/usb/dwc2/core.h:43:
include/linux/usb/gadget.h:348:12: warning: unused function
'usb_gsi_ep_op' [-Wunused-function]
static int usb_gsi_ep_op(struct usb_ep *ep,
^
include/linux/usb/gadget.h:645:12: warning: unused function
'usb_gadget_func_wakeup' [-Wunused-function]
static int usb_gadget_func_wakeup(struct usb_gadget *gadget, int
interface_id)
^
2 warnings generated.
Stub functions are expected to use inline to hide the fact that they are
unused. Add that here to eliminate the warnings.
Change-Id: I55cabd7602e5ddf6213265053e1b7850ff62bcdb
Fixes: 632093eced ("ANDROID: GKI: USB: Resolve ABI diff for usb_gadget and usb_gadget_ops")
Fixes: b582ef5b4d ("ANDROID: GKI: drivers: usb: Add functions usb_func_ep_queue/usb_func_wakeup")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
This commit is contained in:
@@ -345,7 +345,7 @@ static inline int usb_ep_fifo_status(struct usb_ep *ep)
|
||||
static inline void usb_ep_fifo_flush(struct usb_ep *ep)
|
||||
{ }
|
||||
|
||||
static int usb_gsi_ep_op(struct usb_ep *ep,
|
||||
static inline int usb_gsi_ep_op(struct usb_ep *ep,
|
||||
struct usb_gsi_request *req, enum gsi_ep_op op)
|
||||
{ return 0; }
|
||||
#endif /* USB_GADGET */
|
||||
@@ -642,7 +642,8 @@ static inline int usb_gadget_frame_number(struct usb_gadget *gadget)
|
||||
{ return 0; }
|
||||
static inline int usb_gadget_wakeup(struct usb_gadget *gadget)
|
||||
{ return 0; }
|
||||
static int usb_gadget_func_wakeup(struct usb_gadget *gadget, int interface_id)
|
||||
static inline int usb_gadget_func_wakeup(struct usb_gadget *gadget,
|
||||
int interface_id)
|
||||
{ return 0; }
|
||||
static inline int usb_gadget_set_selfpowered(struct usb_gadget *gadget)
|
||||
{ return 0; }
|
||||
|
||||
Reference in New Issue
Block a user