Skip to content
Permalink
Browse files

usb: Remove usb_dc_ep_set_callback return code

Make usb_dc_ep_set_callback() return void since the code is never
used.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
  • Loading branch information...
finikorg authored and nashif committed Mar 6, 2019
1 parent 0d3082c commit 8d6fbde898587258173251b1e9487089dc08c728
@@ -1223,11 +1223,9 @@ int usb_dc_ep_set_callback(const u8_t ep, const usb_dc_ep_callback cb)
return 0;
}

int usb_dc_set_status_callback(const usb_dc_status_callback cb)
void usb_dc_set_status_callback(const usb_dc_status_callback cb)
{
usb_dw_ctrl.status_cb = cb;

return 0;
}

int usb_dc_ep_mps(const u8_t ep)
@@ -831,12 +831,11 @@ int usb_dc_ep_set_callback(const u8_t ep, const usb_dc_ep_callback cb)
return 0;
}

int usb_dc_set_status_callback(const usb_dc_status_callback cb)
void usb_dc_set_status_callback(const usb_dc_status_callback cb)
{
dev_data.status_cb = cb;
LOG_DBG("");

return 0;
dev_data.status_cb = cb;
}

int usb_dc_ep_mps(const u8_t ep)
@@ -473,11 +473,9 @@ int usb_dc_ep_set_callback(const u8_t ep, const usb_dc_ep_callback cb)
return 0;
}

int usb_dc_set_status_callback(const usb_dc_status_callback cb)
void usb_dc_set_status_callback(const usb_dc_status_callback cb)
{
usbip_ctrl.status_cb = cb;

return 0;
}

int usb_dc_ep_mps(const u8_t ep)
@@ -1826,10 +1826,9 @@ int usb_dc_ep_set_callback(const u8_t ep, const usb_dc_ep_callback cb)
return 0;
}

int usb_dc_set_status_callback(const usb_dc_status_callback cb)
void usb_dc_set_status_callback(const usb_dc_status_callback cb)
{
get_usbd_ctx()->status_cb = cb;
return 0;
}

int usb_dc_ep_mps(const u8_t ep)
@@ -372,12 +372,11 @@ int usb_dc_set_address(u8_t addr)
}

/* Set USB device controller status callback */
int usb_dc_set_status_callback(const usb_dc_status_callback cb)
void usb_dc_set_status_callback(const usb_dc_status_callback cb)
{
dev_data.status_cb = cb;
LOG_DBG("");

return 0;
dev_data.status_cb = cb;
}

/* Check endpoint capabilities */
@@ -251,13 +251,11 @@ int usb_dc_set_address(const u8_t addr)
return 0;
}

int usb_dc_set_status_callback(const usb_dc_status_callback cb)
void usb_dc_set_status_callback(const usb_dc_status_callback cb)
{
struct usb_sam0_data *data = usb_sam0_get_data();

data->cb = cb;

return 0;
}

int usb_dc_ep_check_cap(const struct usb_dc_ep_cfg_data * const cfg)
@@ -480,13 +480,11 @@ int usb_dc_ep_set_callback(const u8_t ep, const usb_dc_ep_callback cb)
return 0;
}

int usb_dc_set_status_callback(const usb_dc_status_callback cb)
void usb_dc_set_status_callback(const usb_dc_status_callback cb)
{
LOG_DBG("");

usb_dc_stm32_state.status_cb = cb;

return 0;
}

int usb_dc_set_address(const u8_t addr)
@@ -173,10 +173,8 @@ int usb_dc_set_address(const u8_t addr);
* The status code are described by the usb_dc_status_code enumeration.
*
* @param[in] cb Callback function
*
* @return 0 on success, negative errno code on fail.
*/
int usb_dc_set_status_callback(const usb_dc_status_callback cb);
void usb_dc_set_status_callback(const usb_dc_status_callback cb);

/**
* @brief check endpoint capabilities
@@ -1051,10 +1051,7 @@ int usb_enable(struct usb_cfg_data *config)
}

usb_register_status_callback(forward_status_cb);
ret = usb_dc_set_status_callback(forward_status_cb);
if (ret < 0) {
return ret;
}
usb_dc_set_status_callback(forward_status_cb);

ret = usb_dc_attach();
if (ret < 0) {
@@ -1577,10 +1574,7 @@ static int usb_composite_init(struct device *dev)
usb_register_custom_req_handler(custom_handler);

usb_register_status_callback(forward_status_cb);
ret = usb_dc_set_status_callback(forward_status_cb);
if (ret < 0) {
return ret;
}
usb_dc_set_status_callback(forward_status_cb);

/* Enable VBUS if needed */
ret = usb_vbus_set(true);

0 comments on commit 8d6fbde

Please sign in to comment.
You can’t perform that action at this time.