Changeset bab6388 in mainline for uspace/drv/test1/test1.c


Ignore:
Timestamp:
2011-02-13T20:23:37Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7df0477e
Parents:
68414f4a
Message:

Small additional cleanup.

File:
1 edited

Legend:

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

    r68414f4a rbab6388  
    3636#include "test1.h"
    3737
    38 static int add_device(device_t *dev);
     38static int test1_add_device(device_t *dev);
    3939
    4040static driver_ops_t driver_ops = {
    41         .add_device = &add_device
     41        .add_device = &test1_add_device
    4242};
    4343
    44 static driver_t the_driver = {
     44static driver_t test1_driver = {
    4545        .name = NAME,
    4646        .driver_ops = &driver_ops
     
    5555 * @param score Device match score.
    5656 */
    57 static void register_child_verbose(device_t *parent, const char *message,
     57static void register_fun_verbose(device_t *parent, const char *message,
    5858    const char *name, const char *match_id, int match_score)
    5959{
     
    8989 * @return Error code reporting success of the operation.
    9090 */
    91 static int add_device(device_t *dev)
     91static int test1_add_device(device_t *dev)
    9292{
    9393        function_t *fun_a;
     
    108108                add_function_to_class(fun_a, "virt-null");
    109109        } else if (str_cmp(dev->name, "test1") == 0) {
    110                 register_child_verbose(dev, "cloning myself ;-)", "clone",
     110                register_fun_verbose(dev, "cloning myself ;-)", "clone",
    111111                    "virtual&test1", 10);
    112112        } else if (str_cmp(dev->name, "clone") == 0) {
    113                 register_child_verbose(dev, "run by the same task", "child",
     113                register_fun_verbose(dev, "run by the same task", "child",
    114114                    "virtual&test1&child", 10);
    115115        }
     
    123123{
    124124        printf(NAME ": HelenOS test1 virtual device driver\n");
    125         return driver_main(&the_driver);
     125        return driver_main(&test1_driver);
    126126}
    127127
Note: See TracChangeset for help on using the changeset viewer.