Ignore:
Timestamp:
2013-12-31T02:50:45Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c1ee46f
Parents:
208b5f5
Message:

libdrv: Make driver ops structures constant

These are statically initialized and we don't modify them.
Moves cca 1KB (30%) of data from .data (rw) section to ro. (driver binaries, amd64)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_graph_dev.c

    r208b5f5 r9be30cdf  
    3535#include <errno.h>
    3636#include <async.h>
     37#include <macros.h>
    3738
    3839#include "ops/graph_dev.h"
     
    4142static void remote_graph_connect(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
    4243
    43 static remote_iface_func_ptr_t remote_graph_dev_iface_ops[] = {
     44static const remote_iface_func_ptr_t remote_graph_dev_iface_ops[] = {
    4445        &remote_graph_connect
    4546};
    4647
    4748remote_iface_t remote_graph_dev_iface = {
    48         .method_count = sizeof(remote_graph_dev_iface_ops) /
    49             sizeof(remote_iface_func_ptr_t),
     49        .method_count = ARRAY_SIZE(remote_graph_dev_iface_ops),
    5050        .methods = remote_graph_dev_iface_ops
    5151};
Note: See TracChangeset for help on using the changeset viewer.