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

    r208b5f5 r9be30cdf  
    3838#include <device/battery_dev.h>
    3939#include <ddf/driver.h>
     40#include <macros.h>
    4041
    4142static void remote_battery_status_get(ddf_fun_t *, void *, ipc_callid_t,
     
    4546
    4647/** Remote battery interface operations */
    47 static remote_iface_func_ptr_t remote_battery_dev_iface_ops[] = {
     48static const remote_iface_func_ptr_t remote_battery_dev_iface_ops[] = {
    4849        &remote_battery_status_get,
    4950        &remote_battery_charge_level_get,
     
    5758 */
    5859remote_iface_t remote_battery_dev_iface = {
    59         .method_count = sizeof(remote_battery_dev_iface_ops) /
    60             sizeof(remote_iface_func_ptr_t),
     60        .method_count = ARRAY_SIZE(remote_battery_dev_iface_ops),
    6161        .methods = remote_battery_dev_iface_ops,
    6262};
Note: See TracChangeset for help on using the changeset viewer.