Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbflbk/main.c

    rb09096a r5203e256  
    4646 * @return Error code.
    4747 */
    48 static int usbfallback_device_add(usb_device_t *dev)
     48static int usbfallback_add_device(usb_device_t *dev)
    4949{
    5050        int rc;
     
    6464        }
    6565
    66         dev->driver_data = ctl_fun;
    67 
    6866        usb_log_info("Pretending to control %s `%s'" \
    6967            " (node `%s', handle %" PRIun ").\n",
     
    7472}
    7573
    76 /** Callback when new device is removed and recognized as gone by DDF.
    77  *
    78  * @param dev Representation of a generic DDF device.
    79  * @return Error code.
    80  */
    81 static int usbfallback_device_gone(usb_device_t *dev)
    82 {
    83         assert(dev);
    84         ddf_fun_t *ctl_fun = dev->driver_data;
    85         const int ret = ddf_fun_unbind(ctl_fun);
    86         if (ret != EOK) {
    87                 usb_log_error("Failed to unbind %s.\n", ctl_fun->name);
    88                 return ret;
    89         }
    90         ddf_fun_destroy(ctl_fun);
    91         dev->driver_data = NULL;
    92 
    93         return EOK;
    94 }
    95 
    9674/** USB fallback driver ops. */
    97 static const usb_driver_ops_t usbfallback_driver_ops = {
    98         .device_add = usbfallback_device_add,
    99         .device_rem = usbfallback_device_gone,
    100         .device_gone = usbfallback_device_gone,
     75static usb_driver_ops_t usbfallback_driver_ops = {
     76        .add_device = usbfallback_add_device,
    10177};
    10278
    10379/** USB fallback driver. */
    104 static const usb_driver_t usbfallback_driver = {
     80static usb_driver_t usbfallback_driver = {
    10581        .name = NAME,
    10682        .ops = &usbfallback_driver_ops,
Note: See TracChangeset for help on using the changeset viewer.