Changeset 9be30cdf in mainline for uspace/lib/drv/generic/remote_nic.c


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_nic.c

    r208b5f5 r9be30cdf  
    4040#include <ipc/services.h>
    4141#include <sys/time.h>
     42#include <macros.h>
     43
    4244#include "ops/nic.h"
    4345
     
    11981200 *
    11991201 */
    1200 static remote_iface_func_ptr_t remote_nic_iface_ops[] = {
     1202static const remote_iface_func_ptr_t remote_nic_iface_ops[] = {
    12011203        &remote_nic_send_frame,
    12021204        &remote_nic_callback_create,
     
    12491251 */
    12501252remote_iface_t remote_nic_iface = {
    1251         .method_count = sizeof(remote_nic_iface_ops) /
    1252             sizeof(remote_iface_func_ptr_t),
     1253        .method_count = ARRAY_SIZE(remote_nic_iface_ops),
    12531254        .methods = remote_nic_iface_ops
    12541255};
Note: See TracChangeset for help on using the changeset viewer.