提交 6e310ef8 authored 作者: Giovanni Maruzzelli's avatar Giovanni Maruzzelli

skypopen: slightly improve OSS audio driver

上级 0e83cbe5
......@@ -61,14 +61,14 @@ MODULE_LICENSE("Dual BSD/GPL");
static struct scull_dev *scull_devices; /* allocated in scull_init_module */
#define GIOVA_BLK 1920
#define GIOVA_SLEEP 20000
#define GIOVA_SLEEP 20
void my_timer_callback_inq( unsigned long data )
{
struct scull_dev *dev = (void *)data;
wake_up_interruptible(&dev->inq);
mod_timer( &dev->timer_inq, jiffies + msecs_to_jiffies(GIOVA_SLEEP/1000) );
mod_timer( &dev->timer_inq, jiffies + msecs_to_jiffies(GIOVA_SLEEP) );
}
......@@ -77,7 +77,7 @@ void my_timer_callback_outq( unsigned long data )
struct scull_dev *dev = (void *)data;
wake_up_interruptible(&dev->outq);
mod_timer( &dev->timer_outq, jiffies + msecs_to_jiffies(GIOVA_SLEEP/1000) );
mod_timer( &dev->timer_outq, jiffies + msecs_to_jiffies(GIOVA_SLEEP) );
}
/* The clone-specific data structure includes a key field */
......@@ -117,9 +117,9 @@ static struct scull_dev *scull_c_lookfor_device(dev_t key)
printk(" Timer installing\n");
setup_timer( &lptr->device.timer_inq, my_timer_callback_inq, (long int)lptr );
setup_timer( &lptr->device.timer_outq, my_timer_callback_outq, (long int)lptr );
printk( "Starting timer to fire in %dms (%ld)\n", GIOVA_SLEEP/1000, jiffies );
mod_timer( &lptr->device.timer_inq, jiffies + msecs_to_jiffies(GIOVA_SLEEP/1000) );
mod_timer( &lptr->device.timer_outq, jiffies + msecs_to_jiffies(GIOVA_SLEEP/1000) );
printk( "Starting timer to fire in %dms (%ld)\n", GIOVA_SLEEP, jiffies );
mod_timer( &lptr->device.timer_inq, jiffies + msecs_to_jiffies(GIOVA_SLEEP) );
mod_timer( &lptr->device.timer_outq, jiffies + msecs_to_jiffies(GIOVA_SLEEP) );
/* place it in the list */
list_add(&lptr->list, &scull_c_list);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论