diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2010-07-13 08:33:00 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2010-07-13 08:33:00 +0000 |
commit | 5b506aee19dd5e0e7cbfb10451c05ebf2bcb9739 (patch) | |
tree | 06c09ba708961c0b5d4c9796678ce79e21536c77 /drivers/dahdi/xpp/xpp_dahdi.c | |
parent | 352a000d4f9ec3944bf23e0dda56466a10ad595e (diff) |
Fix building without CONFIG_PROC_FS defined
This changeset should have no functional changes.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8877 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/xpp_dahdi.c')
-rw-r--r-- | drivers/dahdi/xpp/xpp_dahdi.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c index 19a2bc4..3e4b9b2 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.c +++ b/drivers/dahdi/xpp/xpp_dahdi.c @@ -110,6 +110,7 @@ int total_registered_spans(void) return atomic_read(&num_registered_spans); } +#ifdef CONFIG_PROC_FS static int xpd_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data); #ifdef OLD_PROC static int proc_xpd_ztregister_read(char *page, char **start, off_t off, int count, int *eof, void *data); @@ -117,6 +118,7 @@ static int proc_xpd_ztregister_write(struct file *file, const char __user *buffe static int proc_xpd_blink_read(char *page, char **start, off_t off, int count, int *eof, void *data); static int proc_xpd_blink_write(struct file *file, const char __user *buffer, unsigned long count, void *data); #endif +#endif /*------------------------- XPD Management -------------------------*/ @@ -216,9 +218,11 @@ static int xpd_proc_create(xbus_t *xbus, xpd_t *xpd) #endif #endif return 0; +#ifdef CONFIG_PROC_FS err: xpd_proc_remove(xbus, xpd); return -EFAULT; +#endif } void xpd_free(xpd_t *xpd) @@ -831,12 +835,6 @@ static int proc_xpd_blink_write(struct file *file, const char __user *buffer, un */ int xpp_open(struct dahdi_chan *chan) { -#if 0 - xpd_t *xpd = chan->pvt; - xbus_t *xbus = xpd->xbus; - int pos = chan->chanpos - 1; - unsigned long flags; -#else xpd_t *xpd; xbus_t *xbus; int pos; @@ -863,7 +861,6 @@ int xpp_open(struct dahdi_chan *chan) put_xpd(__FUNCTION__, xpd); return -ENODEV; } -#endif spin_lock_irqsave(&xbus->lock, flags); atomic_inc(&xpd->open_counter); LINE_DBG(DEVICES, xpd, pos, "%s[%d]: open_counter=%d\n", @@ -1178,7 +1175,8 @@ static void do_cleanup(void) static int __init xpp_dahdi_init(void) { - int ret = 0; + int ret = 0; + void *top = NULL; INFO("revision %s MAX_XPDS=%d (%d*%d)\n", XPP_VERSION, MAX_XPDS, MAX_UNIT, MAX_SUBUNIT); @@ -1193,13 +1191,14 @@ static int __init xpp_dahdi_init(void) ret = -EIO; goto err; } + top = xpp_proc_toplevel; #endif ret = xbus_core_init(); if(ret) { ERR("xbus_core_init failed (%d)\n", ret); goto err; } - ret = xbus_pcm_init(xpp_proc_toplevel); + ret = xbus_pcm_init(top); if(ret) { ERR("xbus_pcm_init failed (%d)\n", ret); xbus_core_shutdown(); |