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
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user