Changeset db8b7ca in mainline


Ignore:
Timestamp:
2012-12-26T19:02:51Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
34289ea
Parents:
d8cdf39e
Message:

libusbdev: Drop support for custom function data and ops.

Unused and it will go away soon anyway.

Location:
uspace
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhcirh/port.c

    rd8cdf39e rdb8b7ca  
    266266                ret = usb_hc_new_device_wrapper(port->rh, &port->hc_connection,
    267267                    speed, uhci_port_reset_enable, port,
    268                     &port->attached_device.address, NULL, NULL,
    269                     &port->attached_device.fun);
     268                    &port->attached_device.address, &port->attached_device.fun);
    270269        } while (ret != EOK && count-- > 0);
    271270
  • uspace/drv/bus/usb/usbhub/port.c

    rd8cdf39e rdb8b7ca  
    426426        const int rc = usb_hc_new_device_wrapper(data->hub->usb_device->ddf_dev,
    427427            &data->hub->usb_device->hc_conn, data->speed, enable_port_callback,
    428             data->port, &new_address, NULL, NULL, &child_fun);
     428            data->port, &new_address, &child_fun);
    429429
    430430        if (rc == EOK) {
  • uspace/lib/usbdev/include/usb/dev/hub.h

    rd8cdf39e rdb8b7ca  
    4444#include <usb/hc.h>
    4545
    46 extern int usb_hc_new_device_wrapper(ddf_dev_t *, usb_hc_connection_t *, usb_speed_t,
    47     int (*)(void *), void *, usb_address_t *, ddf_dev_ops_t *, void *,
    48     ddf_fun_t **);
     46extern int usb_hc_new_device_wrapper(ddf_dev_t *, usb_hc_connection_t *,
     47    usb_speed_t, int (*)(void *), void *, usb_address_t *, ddf_fun_t **);
    4948
    5049/** Info about device attached to host controller.
  • uspace/lib/usbdev/include/usb/dev/recognise.h

    rd8cdf39e rdb8b7ca  
    5252
    5353extern int usb_device_register_child_in_devman(usb_pipe_t *ctrl_pipe,
    54     ddf_dev_t *, ddf_dev_ops_t *, void *, ddf_fun_t **);
     54    ddf_dev_t *, ddf_fun_t **);
    5555
    5656#endif
  • uspace/lib/usbdev/src/hub.c

    rd8cdf39e rdb8b7ca  
    158158    usb_hc_connection_t *hc_conn, usb_speed_t dev_speed,
    159159    int (*enable_port)(void *arg), void *arg, usb_address_t *assigned_address,
    160     ddf_dev_ops_t *dev_ops, void *new_dev_data, ddf_fun_t **new_fun)
     160    ddf_fun_t **new_fun)
    161161{
    162162        if ((new_fun == NULL) || (hc_conn == NULL))
     
    273273        ddf_fun_t *child_fun;
    274274        rc = usb_device_register_child_in_devman(&ctrl_pipe,
    275             parent, dev_ops, new_dev_data, &child_fun);
     275            parent, &child_fun);
    276276        if (rc != EOK) {
    277277                goto leave_release_free_address;
  • uspace/lib/usbdev/src/recognise.c

    rd8cdf39e rdb8b7ca  
    3333 * Functions for recognition of attached devices.
    3434 */
    35 
    36 /** XXX Fix this */
    37 #define _DDF_DATA_IMPLANT
    3835
    3936#include <sys/types.h>
     
    318315 */
    319316int usb_device_register_child_in_devman(usb_pipe_t *ctrl_pipe,
    320     ddf_dev_t *parent, ddf_dev_ops_t *dev_ops, void *dev_data,
    321     ddf_fun_t **child_fun)
     317    ddf_dev_t *parent, ddf_fun_t **child_fun)
    322318{
    323319        if (child_fun == NULL || ctrl_pipe == NULL)
    324320                return EINVAL;
    325        
    326         if (!dev_ops && dev_data) {
    327                 usb_log_warning("Using standard fun ops with arbitrary "
    328                     "driver data. This does not have to work.\n");
    329         }
    330321       
    331322        /** Index to append after device name for uniqueness. */
     
    354345        }
    355346       
    356         if (dev_ops != NULL)
    357                 ddf_fun_set_ops(child, dev_ops);
    358         else
    359                 ddf_fun_set_ops(child, &child_ops);
    360        
    361         ddf_fun_data_implant(child, dev_data);
    362        
     347        ddf_fun_set_ops(child, &child_ops);
    363348        /*
    364349         * Store the attached device in fun
    365350         * driver data if there is no other data
    366351         */
    367         if (!dev_data) {
    368                 usb_hub_attached_device_t *new_device = ddf_fun_data_alloc(
    369                     child, sizeof(usb_hub_attached_device_t));
    370                 if (!new_device) {
    371                         rc = ENOMEM;
    372                         goto failure;
    373                 }
    374                
    375                 new_device->address = ctrl_pipe->wire->address;
    376                 new_device->fun = child;
    377         }
     352        usb_hub_attached_device_t *new_device = ddf_fun_data_alloc(
     353            child, sizeof(usb_hub_attached_device_t));
     354        if (!new_device) {
     355                rc = ENOMEM;
     356                goto failure;
     357        }
     358       
     359        new_device->address = ctrl_pipe->wire->address;
     360        new_device->fun = child;
    378361       
    379362        match_id_list_t match_ids;
Note: See TracChangeset for help on using the changeset viewer.