Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9a8000bbd | ||
|
|
eedb4bf944 |
@@ -10284,6 +10284,18 @@ MODULE_PARM_DESC(auto_assign_spans,
|
||||
"channel numbers assigned by the driver. If 0, user space "
|
||||
"will need to assign them via /sys/bus/dahdi_devices.");
|
||||
|
||||
|
||||
static ssize_t dahdi_no_read(struct file *file, char __user *usrbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
static ssize_t dahdi_no_write(struct file *file, const char __user *usrbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static const struct file_operations dahdi_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = dahdi_open,
|
||||
@@ -10297,6 +10309,8 @@ static const struct file_operations dahdi_fops = {
|
||||
.ioctl = dahdi_ioctl,
|
||||
#endif
|
||||
.poll = dahdi_poll,
|
||||
.read = dahdi_no_read,
|
||||
.write = dahdi_no_write,
|
||||
};
|
||||
|
||||
static const struct file_operations dahdi_timer_fops = {
|
||||
@@ -10311,6 +10325,8 @@ static const struct file_operations dahdi_timer_fops = {
|
||||
.ioctl = dahdi_timer_ioctl,
|
||||
#endif
|
||||
.poll = dahdi_timer_poll,
|
||||
.read = dahdi_no_read,
|
||||
.write = dahdi_no_write,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -201,7 +201,9 @@ static void dahdi_dynamic_sendmessage(struct dahdi_dynamic *d)
|
||||
static void __dahdi_dynamic_run(void)
|
||||
{
|
||||
struct dahdi_dynamic *d;
|
||||
#ifdef ENABLE_TASKLETS
|
||||
struct dahdi_dynamic_driver *drv;
|
||||
#endif
|
||||
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(d, &dspan_list, list) {
|
||||
@@ -211,6 +213,13 @@ static void __dahdi_dynamic_run(void)
|
||||
}
|
||||
|
||||
#ifdef ENABLE_TASKLETS
|
||||
list_for_each_entry_rcu(drv, &driver_list, list) {
|
||||
/* Flush any traffic still pending in the driver */
|
||||
if (drv->flush) {
|
||||
drv->flush();
|
||||
}
|
||||
}
|
||||
#else
|
||||
/* If tasklets are not enabled, the above section will be called in
|
||||
* interrupt context and the flushing of each driver will be called in a
|
||||
* separate tasklet that only handles that. This is necessary since some
|
||||
@@ -221,13 +230,6 @@ static void __dahdi_dynamic_run(void)
|
||||
*
|
||||
*/
|
||||
tasklet_hi_schedule(&dahdi_dynamic_flush_tlet);
|
||||
#else
|
||||
list_for_each_entry_rcu(drv, &driver_list, list) {
|
||||
/* Flush any traffic still pending in the driver */
|
||||
if (drv->flush) {
|
||||
drv->flush();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user