[input] make mi_e1_line_update() a driver specific callback
This helps us to further disentangle the misdn driver and e1_input in preparation of DAHDI support.
This commit is contained in:
parent
a61c709ef0
commit
5455243306
|
@ -95,6 +95,7 @@ struct e1inp_driver {
|
|||
struct llist_head list;
|
||||
const char *name;
|
||||
int (*want_write)(struct e1inp_ts *ts);
|
||||
int (*line_update)(struct e1inp_line *line);
|
||||
int default_delay;
|
||||
};
|
||||
|
||||
|
|
|
@ -542,7 +542,10 @@ int e1inp_driver_register(struct e1inp_driver *drv)
|
|||
|
||||
int e1inp_line_update(struct e1inp_line *line)
|
||||
{
|
||||
return mi_e1_line_update(line);
|
||||
if (line->driver && line->driver->line_update)
|
||||
return line->driver->line_update(line);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int e1i_sig_cb(unsigned int subsys, unsigned int signal,
|
||||
|
|
|
@ -383,10 +383,13 @@ static int activate_bchan(struct e1inp_line *line, int ts, int act)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int mi_e1_line_update(struct e1inp_line *line);
|
||||
|
||||
struct e1inp_driver misdn_driver = {
|
||||
.name = "mISDNuser",
|
||||
.want_write = ts_want_write,
|
||||
.default_delay = 50000,
|
||||
.line_update = &mi_e1_line_update,
|
||||
};
|
||||
|
||||
static int mi_e1_setup(struct e1inp_line *line, int release_l2)
|
||||
|
@ -478,7 +481,7 @@ static int mi_e1_setup(struct e1inp_line *line, int release_l2)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int mi_e1_line_update(struct e1inp_line *line)
|
||||
static int mi_e1_line_update(struct e1inp_line *line)
|
||||
{
|
||||
struct mISDN_devinfo devinfo;
|
||||
int sk, ret, cnt;
|
||||
|
|
Loading…
Reference in New Issue