[dahdi-commits] sruffell: linux/trunk r5171 - /linux/trunk/drivers/dahdi/wcb4xxp/base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Wed Oct 29 10:31:10 CDT 2008
Author: sruffell
Date: Wed Oct 29 10:31:10 2008
New Revision: 5171
URL: http://svn.digium.com/view/dahdi?view=rev&rev=5171
Log:
By default, do not create the procfs entry for the wcb4xxp driver.
Modified:
linux/trunk/drivers/dahdi/wcb4xxp/base.c
Modified: linux/trunk/drivers/dahdi/wcb4xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wcb4xxp/base.c?view=diff&rev=5171&r1=5170&r2=5171
==============================================================================
--- linux/trunk/drivers/dahdi/wcb4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcb4xxp/base.c Wed Oct 29 10:31:10 2008
@@ -92,9 +92,12 @@
20, 18, 16, 13, 11, 9, 8, 6, 4, 3, 2, 1, 0, 0,
};
+// #undef CREATE_WCB4XXP_PROCFS_ENTRY
+#ifdef CREATE_WCB4XXP_PROCFS_ENTRY
#define PROCFS_MAX_SIZE 1024
#define PROCFS_NAME "wcb4xxp"
static struct proc_dir_entry *myproc;
+#endif
/* Expansion; right now there's just one card and all of its idiosyncrasies. */
@@ -2288,6 +2291,7 @@
/********************************************************************************* proc stuff *****/
+#ifdef CREATE_WCB4XXP_PROCFS_ENTRY
static int b4xxp_proc_read_one(char *buf, struct b4xxp *b4)
{
struct dahdi_chan *chan;
@@ -2333,7 +2337,9 @@
len = sprintf(buf, "%s\n%s\nTicks: %ld\n", sBuf, str, b4->ticks);
return len;
}
-
+#endif
+
+#ifdef CREATE_WCB4XXP_PROCFS_ENTRY
static int b4xxp_proc_read(char *buf, char **start, off_t offset, int count, int *eof, void *data)
{
struct b4xxp **b4_cards = data;
@@ -2374,6 +2380,7 @@
*eof = 1;
return len;
}
+#endif
static int __devinit b4xx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
@@ -2487,6 +2494,7 @@
}
}
+#ifdef CREATE_WCB4XXP_PROCFS_ENTRY
if(!(myproc = create_proc_entry(PROCFS_NAME, 0444, NULL))) {
remove_proc_entry(PROCFS_NAME, &proc_root);
dev_err(b4->dev, "Error: Could not initialize /proc/%s\n", PROCFS_NAME);
@@ -2500,6 +2508,7 @@
myproc->uid = 0;
myproc->gid = 0;
myproc->size = 37;
+#endif
#if 0
/* Launch cards as appropriate */
@@ -2575,7 +2584,9 @@
dahdi_unregister(&b4->spans[i].span);
}
+#ifdef CREATE_WCB4XXP_PROCFS_ENTRY
remove_proc_entry(PROCFS_NAME, &proc_root);
+#endif
b4xxp_init_stage1(b4);
free_irq(pdev->irq, b4);
pci_set_drvdata(pdev, NULL);
More information about the dahdi-commits
mailing list