dahdi_get_auto_assigned_spans
Commit 74e949c33a exported the module
variable dahdi.auto_assigned_spans. However this is not a good name.
This commit reverts the export and replaces it with a new function to
get the value of the variable.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
This commit is contained in:
@@ -7374,10 +7374,18 @@ int dahdi_assign_device_spans(struct dahdi_device *ddev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int auto_assign_spans = 1;
|
||||
EXPORT_SYMBOL(auto_assign_spans);
|
||||
static int auto_assign_spans = 1;
|
||||
static const char *UNKNOWN = "";
|
||||
|
||||
/**
|
||||
* dahdi_auto_assign_spans - is the parameter auto_assign_spans set?
|
||||
*/
|
||||
int dahdi_get_auto_assign_spans(void)
|
||||
{
|
||||
return auto_assign_spans;
|
||||
}
|
||||
EXPORT_SYMBOL(dahdi_get_auto_assign_spans);
|
||||
|
||||
/**
|
||||
* _dahdi_register_device - Registers a DAHDI device and assign its spans.
|
||||
* @ddev: the DAHDI device
|
||||
|
||||
@@ -1118,7 +1118,7 @@ void xbus_populate(void *data)
|
||||
*/
|
||||
xbus_request_sync(xbus, SYNC_MODE_PLL);
|
||||
elect_syncer("xbus_populate(end)"); /* FIXME: try to do it later */
|
||||
if (!auto_assign_spans)
|
||||
if (!dahdi_get_auto_assign_spans())
|
||||
xbus_register_dahdi_device(xbus);
|
||||
out:
|
||||
XBUS_DBG(DEVICES, xbus, "Leaving\n");
|
||||
|
||||
@@ -1280,7 +1280,8 @@ static inline void dahdi_ec_span(struct dahdi_span *span)
|
||||
}
|
||||
|
||||
extern struct file_operations *dahdi_transcode_fops;
|
||||
extern int auto_assign_spans;
|
||||
|
||||
int dahdi_get_auto_assign_spans(void);
|
||||
|
||||
/* Don't use these directly -- they're not guaranteed to
|
||||
be there. */
|
||||
|
||||
Reference in New Issue
Block a user