diff options
author | Tzafrir Cohen <tzafrir@cohens.org.il> | 2010-09-08 13:34:58 +0300 |
---|---|---|
committer | Tzafrir Cohen <tzafrir@cohens.org.il> | 2010-09-08 13:34:58 +0300 |
commit | db5ce0faef41095d4fbf9804031931f8e886b2a1 (patch) | |
tree | 483e24612e456dad08b7c23dbad087cabd9adb21 /drivers/dahdi/opvxa1200.c | |
parent | bc4ae5301d9c34a7f4df74ba1e84742b8e65ab58 (diff) |
remove 'pvt' member of dahdi_span
r8984 removed the member 'pvt' of struct dahdi_span in dahdi/kernel.h . No
use to have a pointer to a struct that is already embedded in our struct.
Thus we remove a single usage of it and replace it with container_of().
Diffstat (limited to 'drivers/dahdi/opvxa1200.c')
-rw-r--r-- | drivers/dahdi/opvxa1200.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/dahdi/opvxa1200.c b/drivers/dahdi/opvxa1200.c index 8a5193e..77a1e02 100644 --- a/drivers/dahdi/opvxa1200.c +++ b/drivers/dahdi/opvxa1200.c @@ -2267,10 +2267,14 @@ static int wctdm_open(struct dahdi_chan *chan) return 0; } +static inline struct wctdm* wctdm_from_span(struct dahdi_span *span) { + return container_of(span, struct wctdm, span); +} + static int wctdm_watchdog(struct dahdi_span *span, int event) { printk(KERN_INFO "opvxa1200: Restarting DMA\n"); - wctdm_restart_dma(span->pvt); + wctdm_restart_dma(wctdm_from_span(span)); return 0; } @@ -2412,7 +2416,6 @@ static int wctdm_initialize(struct wctdm *wc) wc->span.watchdog = wctdm_watchdog; init_waitqueue_head(&wc->span.maintq); - wc->span.pvt = wc; if (dahdi_register(&wc->span, 0)) { printk(KERN_NOTICE "Unable to register span with Dahdi\n"); return -1; |