Ignore:
Timestamp:
2013-12-31T02:50:45Z (10 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_usbhid.c

    r208b5f5 r9be30cdf  
    3737#include <assert.h>
    3838#include <stdio.h>
     39#include <macros.h>
    3940
    4041#include "usbhid_iface.h"
     
    4849
    4950/** Remote USB HID interface operations. */
    50 static remote_iface_func_ptr_t remote_usbhid_iface_ops [] = {
     51static const remote_iface_func_ptr_t remote_usbhid_iface_ops [] = {
    5152        remote_usbhid_get_event_length,
    5253        remote_usbhid_get_event,
     
    5859 */
    5960remote_iface_t remote_usbhid_iface = {
    60         .method_count = sizeof(remote_usbhid_iface_ops) /
    61             sizeof(remote_usbhid_iface_ops[0]),
     61        .method_count = ARRAY_SIZE(remote_usbhid_iface_ops),
    6262        .methods = remote_usbhid_iface_ops
    6363};
Note: See TracChangeset for help on using the changeset viewer.