Changeset 83a2f43 in mainline for uspace/drv/test1


Ignore:
Timestamp:
2011-02-15T19:43:50Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
af6b5157
Parents:
34588a80
Message:

Rename bunch of stuff so that it starts with 'ddf_'.

Location:
uspace/drv/test1
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/test1/char.c

    r34588a80 r83a2f43  
    3737#include "test1.h"
    3838
    39 static int impl_char_read(function_t *fun, char *buf, size_t count) {
     39static int impl_char_read(ddf_fun_t *fun, char *buf, size_t count) {
    4040        memset(buf, 0, count);
    4141        return count;
    4242}
    4343
    44 static int imp_char_write(function_t *fun, char *buf, size_t count) {
     44static int imp_char_write(ddf_fun_t *fun, char *buf, size_t count) {
    4545        return count;
    4646}
     
    5151};
    5252
    53 device_ops_t char_device_ops = {
     53ddf_dev_ops_t char_device_ops = {
    5454        .interfaces[CHAR_DEV_IFACE] = &char_dev_ops
    5555};
  • uspace/drv/test1/test1.c

    r34588a80 r83a2f43  
    3636#include "test1.h"
    3737
    38 static int test1_add_device(device_t *dev);
     38static int test1_add_device(ddf_dev_t *dev);
    3939
    4040static driver_ops_t driver_ops = {
     
    5555 * @param score Device match score.
    5656 */
    57 static int register_fun_verbose(device_t *parent, const char *message,
     57static int register_fun_verbose(ddf_dev_t *parent, const char *message,
    5858    const char *name, const char *match_id, int match_score)
    5959{
    60         function_t *fun;
     60        ddf_fun_t *fun;
    6161        int rc;
    6262
     
    105105 * @return Error code reporting success of the operation.
    106106 */
    107 static int test1_add_device(device_t *dev)
     107static int test1_add_device(ddf_dev_t *dev)
    108108{
    109         function_t *fun_a;
     109        ddf_fun_t *fun_a;
    110110        int rc;
    111111
     
    125125        }
    126126
    127         add_function_to_class(fun_a, "virtual");
     127        ddf_fun_add_to_class(fun_a, "virtual");
    128128
    129129        if (str_cmp(dev->name, "null") == 0) {
    130130                fun_a->ops = &char_device_ops;
    131                 add_function_to_class(fun_a, "virt-null");
     131                ddf_fun_add_to_class(fun_a, "virt-null");
    132132        } else if (str_cmp(dev->name, "test1") == 0) {
    133133                (void) register_fun_verbose(dev, "cloning myself ;-)", "clone",
     
    146146{
    147147        printf(NAME ": HelenOS test1 virtual device driver\n");
    148         return driver_main(&test1_driver);
     148        return ddf_driver_main(&test1_driver);
    149149}
    150150
  • uspace/drv/test1/test1.h

    r34588a80 r83a2f43  
    3636#define NAME "test1"
    3737
    38 extern device_ops_t char_device_ops;
     38extern ddf_dev_ops_t char_device_ops;
    3939
    4040#endif
Note: See TracChangeset for help on using the changeset viewer.