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


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

    r208b5f5 r9be30cdf  
    3636#include <async.h>
    3737#include <errno.h>
     38#include <macros.h>
    3839
    3940#include "pci_dev_iface.h"
     
    4950
    5051/** Remote USB interface operations. */
    51 static remote_iface_func_ptr_t remote_pci_iface_ops [] = {
     52static const remote_iface_func_ptr_t remote_pci_iface_ops [] = {
    5253        remote_config_space_read_8,
    5354        remote_config_space_read_16,
     
    6263 */
    6364remote_iface_t remote_pci_iface = {
    64         .method_count = sizeof(remote_pci_iface_ops) /
    65             sizeof(remote_pci_iface_ops[0]),
     65        .method_count = ARRAY_SIZE(remote_pci_iface_ops),
    6666        .methods = remote_pci_iface_ops
    6767};
Note: See TracChangeset for help on using the changeset viewer.