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

    r208b5f5 r9be30cdf  
    3838#include <macros.h>
    3939#include <str.h>
    40 #include <as.h>
    4140#include <sys/mman.h>
    4241
     
    611610
    612611/** Remote audio pcm buffer interface operations. */
    613 static remote_iface_func_ptr_t remote_audio_pcm_iface_ops[] = {
     612static const remote_iface_func_ptr_t remote_audio_pcm_iface_ops[] = {
    614613        [IPC_M_AUDIO_PCM_GET_INFO_STR] = remote_audio_pcm_get_info_str,
    615614        [IPC_M_AUDIO_PCM_QUERY_CAPS] = remote_audio_pcm_query_caps,
     
    628627/** Remote audio mixer interface structure. */
    629628remote_iface_t remote_audio_pcm_iface = {
    630         .method_count = sizeof(remote_audio_pcm_iface_ops) /
    631             sizeof(remote_audio_pcm_iface_ops[0]),
     629        .method_count = ARRAY_SIZE(remote_audio_pcm_iface_ops),
    632630        .methods = remote_audio_pcm_iface_ops
    633631};
Note: See TracChangeset for help on using the changeset viewer.