Ignore:
Timestamp:
2012-08-21T10:04:16Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
67edca6
Parents:
0da6c04 (diff), 6a97f2e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with upstream (lp:~wtachi/helenos/bithenge)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/mouse/mousedev.c

    r0da6c04 r5e718d9  
    3434 * USB Mouse driver API.
    3535 */
     36
     37/* XXX Fix this */
     38#define _DDF_DATA_IMPLANT
    3639
    3740#include <usb/debug.h>
     
    115118    ipc_callid_t icallid, ipc_call_t *icall)
    116119{
    117         usb_mouse_t *mouse_dev = fun->driver_data;
     120        usb_mouse_t *mouse_dev = ddf_fun_data_get(fun);
    118121
    119122        if (mouse_dev == NULL) {
     
    123126        }
    124127
    125         usb_log_debug("%s: fun->name: %s\n", __FUNCTION__, fun->name);
     128        usb_log_debug("%s: fun->name: %s\n", __FUNCTION__, ddf_fun_get_name(fun));
    126129        usb_log_debug("%s: mouse_sess: %p\n",
    127130            __FUNCTION__, mouse_dev->mouse_sess);
     
    133136                        mouse_dev->mouse_sess = sess;
    134137                        usb_log_debug("Console session to %s set ok (%p).\n",
    135                             fun->name, sess);
     138                            ddf_fun_get_name(fun), sess);
    136139                        async_answer_0(icallid, EOK);
    137140                } else {
    138141                        usb_log_error("Console session to %s already set.\n",
    139                             fun->name);
     142                            ddf_fun_get_name(fun));
    140143                        async_answer_0(icallid, ELIMIT);
    141144                        async_hangup(sess);
     
    249252if (fun) { \
    250253        if (ddf_fun_unbind((fun)) == EOK) { \
    251                 (fun)->driver_data = NULL; \
    252254                ddf_fun_destroy((fun)); \
    253255        } else { \
    254256                usb_log_error("Could not unbind function `%s', it " \
    255                     "will not be destroyed.\n", (fun)->name); \
     257                    "will not be destroyed.\n", ddf_fun_get_name(fun)); \
    256258        } \
    257259} else (void)0
     
    272274        }
    273275
    274         fun->ops = &ops;
    275         fun->driver_data = mouse;
     276        ddf_fun_set_ops(fun, &ops);
     277        ddf_fun_data_implant(fun, mouse);
    276278
    277279        int rc = ddf_fun_bind(fun);
    278280        if (rc != EOK) {
    279281                usb_log_error("Could not bind DDF function `%s': %s.\n",
    280                     fun->name, str_error(rc));
    281                 fun->driver_data = NULL;
     282                    ddf_fun_get_name(fun), str_error(rc));
    282283                ddf_fun_destroy(fun);
    283284                return rc;
     
    285286
    286287        usb_log_debug("Adding DDF function `%s' to category %s...\n",
    287             fun->name, HID_MOUSE_CATEGORY);
     288            ddf_fun_get_name(fun), HID_MOUSE_CATEGORY);
    288289        rc = ddf_fun_add_to_category(fun, HID_MOUSE_CATEGORY);
    289290        if (rc != EOK) {
     
    419420
    420421        free(mouse_dev->buttons);
    421         free(mouse_dev);
    422422}
    423423
Note: See TracChangeset for help on using the changeset viewer.