Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 260882 Details for
Bug 352985
net-misc/dahdi-2.4.0 fails to compile against linux 2.6.37
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Patch to resolve the issue
dahdi-2.4.0-mutex.patch (text/plain), 3.96 KB, created by
Peter Fry
on 2011-01-27 20:09:30 UTC
(
hide
)
Description:
Patch to resolve the issue
Filename:
MIME Type:
Creator:
Peter Fry
Created:
2011-01-27 20:09:30 UTC
Size:
3.96 KB
patch
obsolete
>Index: include/dahdi/kernel.h >=================================================================== >--- include/dahdi/kernel.h (revision 9463) >+++ include/dahdi/kernel.h (revision 9464) >@@ -1291,6 +1291,11 @@ > #define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED > #endif > >+#ifndef DEFINE_SEMAPHORE >+#define DEFINE_SEMAPHORE(name) \ >+ struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) >+#endif >+ > #ifndef DMA_BIT_MASK > #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) > #endif >Index: drivers/dahdi/hpec/dahdi_echocan_hpec.c >=================================================================== >--- drivers/dahdi/hpec/dahdi_echocan_hpec.c (revision 9463) >+++ drivers/dahdi/hpec/dahdi_echocan_hpec.c (revision 9464) >@@ -115,7 +115,7 @@ > hpec_channel_update(pvt->hpec, isig, iref); > } > >-DECLARE_MUTEX(license_lock); >+DEFINE_SEMAPHORE(license_lock); > > static int echo_can_create(struct dahdi_chan *chan, struct dahdi_echocanparams *ecp, > struct dahdi_echocanparam *p, struct dahdi_echocan_state **ec) >Index: drivers/dahdi/voicebus/voicebus.c >=================================================================== >--- drivers/dahdi/voicebus/voicebus.c (revision 9463) >+++ drivers/dahdi/voicebus/voicebus.c (revision 9464) >@@ -1107,7 +1107,7 @@ > */ > void voicebus_stop(struct voicebus *vb) > { >- static DECLARE_MUTEX(stop); >+ static DEFINE_SEMAPHORE(stop); > > down(&stop); > >Index: drivers/dahdi/xpp/xpp_usb.c >=================================================================== >--- drivers/dahdi/xpp/xpp_usb.c (revision 9463) >+++ drivers/dahdi/xpp/xpp_usb.c (revision 9464) >@@ -248,7 +248,7 @@ > > > /* prevent races between open() and disconnect() */ >-static DECLARE_MUTEX (disconnect_sem); >+static DEFINE_SEMAPHORE(disconnect_sem); > > /* > * AsteriskNow kernel has backported the "lean" callback from 2.6.20 >@@ -690,7 +690,7 @@ > retval = -ENOMEM; > goto probe_failed; > } >- init_MUTEX (&xusb->sem); >+ sema_init(&xusb->sem, 1); > atomic_set(&xusb->pending_writes, 0); > atomic_set(&xusb->pending_reads, 0); > atomic_set(&xusb->pcm_tx_drops, 0); >Index: drivers/dahdi/xpp/xbus-core.c >=================================================================== >--- drivers/dahdi/xpp/xbus-core.c (revision 9463) >+++ drivers/dahdi/xpp/xbus-core.c (revision 9464) >@@ -1165,7 +1165,7 @@ > INIT_LIST_HEAD(&worker->card_list); > init_waitqueue_head(&worker->wait_for_xpd_initialization); > worker->wq = NULL; >- init_MUTEX(&xbus->worker.running_initialization); >+ sema_init(&xbus->worker.running_initialization, 1); > } > > /* >Index: drivers/dahdi/wctdm24xxp/xhfc.c >=================================================================== >--- drivers/dahdi/wctdm24xxp/xhfc.c (revision 9463) >+++ drivers/dahdi/wctdm24xxp/xhfc.c (revision 9464) >@@ -2576,8 +2576,8 @@ > } > > spin_lock_init(&b4->reglock); >- init_MUTEX(&b4->regsem); >- init_MUTEX(&b4->fifosem); >+ sema_init(&b4->regsem, 1); >+ sema_init(&b4->fifosem, 1); > > for (x = 0; x < 4; x++) { > fasthdlc_init(&b4->spans[x].rxhdlc, FASTHDLC_MODE_16); >Index: drivers/dahdi/wctdm24xxp/base.c >=================================================================== >--- drivers/dahdi/wctdm24xxp/base.c (revision 9463) >+++ drivers/dahdi/wctdm24xxp/base.c (revision 9464) >@@ -207,7 +207,7 @@ > } > > struct wctdm *ifaces[WC_MAX_IFACES]; >-DECLARE_MUTEX(ifacelock); >+DEFINE_SEMAPHORE(ifacelock); > > static void wctdm_release(struct wctdm *wc); > >@@ -4923,7 +4923,7 @@ > > /* This is to insure that the analog span is given lowest priority */ > wc->oldsync = -1; >- init_MUTEX(&wc->syncsem); >+ sema_init(&wc->syncsem, 1); > INIT_LIST_HEAD(&wc->frame_list); > spin_lock_init(&wc->frame_list_lock); > >Index: drivers/dahdi/wctc4xxp/base.c >=================================================================== >--- drivers/dahdi/wctc4xxp/base.c (revision 9463) >+++ drivers/dahdi/wctc4xxp/base.c (revision 9464) >@@ -3443,7 +3443,7 @@ > return -EIO; > } > >- init_MUTEX(&wc->chansem); >+ sema_init(&wc->chansem, 1); > spin_lock_init(&wc->reglock); > spin_lock_init(&wc->cmd_list_lock); > spin_lock_init(&wc->rx_list_lock);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 352985
: 260882