mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2025-12-26 23:26:46 +01:00
changes in timer API in 6.16.0
This commit is contained in:
@@ -214,6 +214,7 @@ static int dvb_dvr_release(struct inode *inode, struct file *file)
|
|||||||
dmxdev->demux->connect_frontend(dmxdev->demux,
|
dmxdev->demux->connect_frontend(dmxdev->demux,
|
||||||
dmxdev->dvr_orig_fe);
|
dmxdev->dvr_orig_fe);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((file->f_flags & O_ACCMODE) == O_RDONLY) ||
|
if (((file->f_flags & O_ACCMODE) == O_RDONLY) ||
|
||||||
dmxdev->may_do_mmap) {
|
dmxdev->may_do_mmap) {
|
||||||
#ifdef CONFIG_DVB_MMAP
|
#ifdef CONFIG_DVB_MMAP
|
||||||
@@ -359,8 +360,12 @@ static int dvb_dmxdev_set_buffer_size(struct dmxdev_filter *dmxdevfilter,
|
|||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||||
static void dvb_dmxdev_filter_timeout(struct timer_list *t)
|
static void dvb_dmxdev_filter_timeout(struct timer_list *t)
|
||||||
{
|
{
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0))
|
||||||
|
struct dmxdev_filter *dmxdevfilter = timer_container_of(dmxdevfilter,
|
||||||
|
t, timer);
|
||||||
|
#else
|
||||||
struct dmxdev_filter *dmxdevfilter = from_timer(dmxdevfilter, t, timer);
|
struct dmxdev_filter *dmxdevfilter = from_timer(dmxdevfilter, t, timer);
|
||||||
|
#endif
|
||||||
dmxdevfilter->buffer.error = -ETIMEDOUT;
|
dmxdevfilter->buffer.error = -ETIMEDOUT;
|
||||||
spin_lock_irq(&dmxdevfilter->dev->lock);
|
spin_lock_irq(&dmxdevfilter->dev->lock);
|
||||||
dmxdevfilter->state = DMXDEV_STATE_TIMEDOUT;
|
dmxdevfilter->state = DMXDEV_STATE_TIMEDOUT;
|
||||||
@@ -372,7 +377,11 @@ static void dvb_dmxdev_filter_timer(struct dmxdev_filter *dmxdevfilter)
|
|||||||
{
|
{
|
||||||
struct dmx_sct_filter_params *para = &dmxdevfilter->params.sec;
|
struct dmx_sct_filter_params *para = &dmxdevfilter->params.sec;
|
||||||
|
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0))
|
||||||
|
timer_delete(&dmxdevfilter->timer);
|
||||||
|
#else
|
||||||
del_timer(&dmxdevfilter->timer);
|
del_timer(&dmxdevfilter->timer);
|
||||||
|
#endif
|
||||||
if (para->timeout) {
|
if (para->timeout) {
|
||||||
dmxdevfilter->timer.expires =
|
dmxdevfilter->timer.expires =
|
||||||
jiffies + 1 + (HZ / 2 + HZ * para->timeout) / 1000;
|
jiffies + 1 + (HZ / 2 + HZ * para->timeout) / 1000;
|
||||||
@@ -428,7 +437,11 @@ static int dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len,
|
|||||||
spin_unlock(&dmxdevfilter->dev->lock);
|
spin_unlock(&dmxdevfilter->dev->lock);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0))
|
||||||
|
timer_delete(&dmxdevfilter->timer);
|
||||||
|
#else
|
||||||
del_timer(&dmxdevfilter->timer);
|
del_timer(&dmxdevfilter->timer);
|
||||||
|
#endif
|
||||||
dprintk("section callback %*ph\n", 6, buffer1);
|
dprintk("section callback %*ph\n", 6, buffer1);
|
||||||
#ifdef CONFIG_DVB_MMAP
|
#ifdef CONFIG_DVB_MMAP
|
||||||
if (dvb_vb2_is_streaming(&dmxdevfilter->vb2_ctx)) {
|
if (dvb_vb2_is_streaming(&dmxdevfilter->vb2_ctx)) {
|
||||||
@@ -532,7 +545,11 @@ static int dvb_dmxdev_feed_stop(struct dmxdev_filter *dmxdevfilter)
|
|||||||
|
|
||||||
switch (dmxdevfilter->type) {
|
switch (dmxdevfilter->type) {
|
||||||
case DMXDEV_TYPE_SEC:
|
case DMXDEV_TYPE_SEC:
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0))
|
||||||
|
timer_delete(&dmxdevfilter->timer);
|
||||||
|
#else
|
||||||
del_timer(&dmxdevfilter->timer);
|
del_timer(&dmxdevfilter->timer);
|
||||||
|
#endif
|
||||||
dmxdevfilter->feed.sec->stop_filtering(dmxdevfilter->feed.sec);
|
dmxdevfilter->feed.sec->stop_filtering(dmxdevfilter->feed.sec);
|
||||||
break;
|
break;
|
||||||
case DMXDEV_TYPE_PES:
|
case DMXDEV_TYPE_PES:
|
||||||
@@ -781,7 +798,8 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter)
|
|||||||
ret = (*secfeed)->allocate_filter(*secfeed, secfilter);
|
ret = (*secfeed)->allocate_filter(*secfeed, secfilter);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dvb_dmxdev_feed_restart(filter);
|
dvb_dmxdev_feed_restart(filter);
|
||||||
filter->feed.sec->start_filtering(*secfeed);
|
*secfeed = NULL;
|
||||||
|
//filter->feed.sec->start_filtering(*secfeed);
|
||||||
dprintk("could not get filter\n");
|
dprintk("could not get filter\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user