diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-01-03 18:27:10 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-01-03 18:27:10 +0000 |
commit | 7b43ad994f6b29b65e109c856f83c5967a222e14 (patch) | |
tree | fc9b6dc0120b1390e375ec641ad50725e7caabf5 /include | |
parent | 736d228e663b23f0182816d5b1257f0de3f4baa8 (diff) |
dahdi: Change reference counting for tone zones.
This change primarily is a memory reduction. Most users only ever have
a single tone zone loaded so we can save some mostly unused pointers by
using a list instead of an array. Since we also have a pointer to the
dahdi_zone in struct dahdi_chan, we also don't need to store the integer
that is an index into that array. This saves 4 bytes for every channel
allocated in the system. Finally, we don't need a separate default_zone
member since we're on a list, we can define the first element on
the list to always be the default zone.
Additionally, all reference counted structures in the drivers should
standardize on kref as much as possible for simplicity.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9594 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'include')
-rw-r--r-- | include/dahdi/kernel.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 5bcf10d..5d79ae0 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -483,7 +483,6 @@ struct dahdi_chan { /* Tone zone stuff */ struct dahdi_zone *curzone; /*!< Zone for selecting tones */ - int tonezone; /*!< Tone zone for this channel */ struct dahdi_tone *curtone; /*!< Current tone we're playing (if any) */ int tonep; /*!< Current position in tone */ struct dahdi_tone_state ts; /*!< Tone state */ |