Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 617876 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/dahdi/dahdi-base.c (-3 / +8 lines)
Lines 10069-10075 static inline unsigned long msecs_processed(const struct core_timer *const ct) Link Here
10069
	return atomic_read(&ct->count) * DAHDI_MSECS_PER_CHUNK;
10069
	return atomic_read(&ct->count) * DAHDI_MSECS_PER_CHUNK;
10070
}
10070
}
10071
10071
10072
static void coretimer_func(unsigned long param)
10072
static void coretimer_func(
10073
#ifdef init_timer	/* Compatibility for pre 4.15 interface */
10074
		unsigned long param
10075
#else
10076
		struct timer_list *t
10077
#endif
10078
)
10073
{
10079
{
10074
	unsigned long flags;
10080
	unsigned long flags;
10075
	unsigned long ms_since_start;
10081
	unsigned long ms_since_start;
Lines 10150-10157 static void coretimer_func(unsigned long param) Link Here
10150
10156
10151
static void coretimer_init(void)
10157
static void coretimer_init(void)
10152
{
10158
{
10153
	init_timer(&core_timer.timer);
10159
	timer_setup(&core_timer.timer, coretimer_func, 0);
10154
	core_timer.timer.function = coretimer_func;
10155
	ktime_get_ts(&core_timer.start_interval);
10160
	ktime_get_ts(&core_timer.start_interval);
10156
	atomic_set(&core_timer.count, 0);
10161
	atomic_set(&core_timer.count, 0);
10157
	atomic_set(&core_timer.shutdown, 0);
10162
	atomic_set(&core_timer.shutdown, 0);
(-)a/drivers/dahdi/dahdi_dynamic.c (-5 / +8 lines)
Lines 831-837 EXPORT_SYMBOL(dahdi_dynamic_unregister_driver); Link Here
831
831
832
static struct timer_list alarmcheck;
832
static struct timer_list alarmcheck;
833
833
834
static void check_for_red_alarm(unsigned long ignored)
834
static void check_for_red_alarm(
835
#ifdef init_timer	/* Compatibility for pre 4.15 interface */
836
		unsigned long ignored
837
#else
838
		struct timer_list *ignored
839
#endif
840
)
835
{
841
{
836
	int newalarm;
842
	int newalarm;
837
	int alarmchanged = 0;
843
	int alarmchanged = 0;
Lines 867-876 static const struct dahdi_dynamic_ops dahdi_dynamic_ops = { Link Here
867
static int dahdi_dynamic_init(void)
873
static int dahdi_dynamic_init(void)
868
{
874
{
869
	/* Start process to check for RED ALARM */
875
	/* Start process to check for RED ALARM */
870
	init_timer(&alarmcheck);
876
	timer_setup(&alarmcheck, check_for_red_alarm, 0);
871
	alarmcheck.expires = 0;
872
	alarmcheck.data = 0;
873
	alarmcheck.function = check_for_red_alarm;
874
	/* Check once per second */
877
	/* Check once per second */
875
	mod_timer(&alarmcheck, jiffies + 1 * HZ);
878
	mod_timer(&alarmcheck, jiffies + 1 * HZ);
876
#ifdef ENABLE_TASKLETS
879
#ifdef ENABLE_TASKLETS
(-)a/drivers/dahdi/dahdi_dynamic_ethmf.c (-3 / +8 lines)
Lines 681-687 static int ethmf_delay_dec(void) Link Here
681
 * Timer callback function to allow all spans to be added, prior to any of
681
 * Timer callback function to allow all spans to be added, prior to any of
682
 * them being used.
682
 * them being used.
683
 */
683
 */
684
static void timer_callback(unsigned long param)
684
static void timer_callback(
685
#ifdef init_timer	/* Compatibility for pre 4.15 interface */
686
		unsigned long ignored
687
#else
688
		struct timer_list *ignored
689
#endif
690
)
685
{
691
{
686
	if (ethmf_delay_dec()) {
692
	if (ethmf_delay_dec()) {
687
		if (!atomic_read(&timer_deleted)) {
693
		if (!atomic_read(&timer_deleted)) {
Lines 764-772 static const struct file_operations ztdethmf_proc_fops = { Link Here
764
770
765
static int __init ztdethmf_init(void)
771
static int __init ztdethmf_init(void)
766
{
772
{
767
	init_timer(&timer);
773
	timer_setup(&timer, &timer_callback, 0);
768
	timer.expires = jiffies + HZ;
774
	timer.expires = jiffies + HZ;
769
	timer.function = &timer_callback;
770
	if (!timer_pending(&timer))
775
	if (!timer_pending(&timer))
771
		add_timer(&timer);
776
		add_timer(&timer);
772
777
(-)a/drivers/dahdi/wctc4xxp/base.c (-1 / +7 lines)
Lines 3701-3709 wctc4xxp_send_commands(struct wcdte *wc, struct list_head *to_send) Link Here
3701
}
3701
}
3702
3702
3703
static void
3703
static void
3704
#ifndef init_timer
3705
wctc4xxp_watchdog(struct timer_list *t)
3706
{
3707
	struct wcdte *wc = from_timer(wc, t, watchdog);
3708
#else	/* Compatibility for pre 4.15 interface */
3704
wctc4xxp_watchdog(unsigned long data)
3709
wctc4xxp_watchdog(unsigned long data)
3705
{
3710
{
3706
	struct wcdte *wc = (struct wcdte *)data;
3711
	struct wcdte *wc = (struct wcdte *)data;
3712
#endif
3707
	struct tcb *cmd, *temp;
3713
	struct tcb *cmd, *temp;
3708
	LIST_HEAD(cmds_to_retry);
3714
	LIST_HEAD(cmds_to_retry);
3709
	const int MAX_RETRIES = 5;
3715
	const int MAX_RETRIES = 5;
Lines 4095-4101 wctc4xxp_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) Link Here
4095
	wc->watchdog.data = (unsigned long)wc;
4101
	wc->watchdog.data = (unsigned long)wc;
4096
	init_timer(&wc->watchdog);
4102
	init_timer(&wc->watchdog);
4097
#	else
4103
#	else
4098
	setup_timer(&wc->watchdog, wctc4xxp_watchdog, (unsigned long)wc);
4104
	timer_setup(&wc->watchdog, wctc4xxp_watchdog, 0);
4099
#	endif
4105
#	endif
4100
4106
4101
	/* ------------------------------------------------------------------
4107
	/* ------------------------------------------------------------------
(-)a/drivers/dahdi/wcte12xp/base.c (-1 / +8 lines)
Lines 2765-2774 static void vpm_check_func(struct work_struct *work) Link Here
2765
	return;
2765
	return;
2766
}
2766
}
2767
2767
2768
#ifndef init_timer
2769
static void te12xp_timer(struct timer_list *t)
2770
{
2771
	unsigned long flags;
2772
	struct t1 *wc = from_timer(wc, t, timer);
2773
#else	/* Compatibility for pre 4.15 interface */
2768
static void te12xp_timer(unsigned long data)
2774
static void te12xp_timer(unsigned long data)
2769
{
2775
{
2770
	unsigned long flags;
2776
	unsigned long flags;
2771
	struct t1 *wc = (struct t1 *)data;
2777
	struct t1 *wc = (struct t1 *)data;
2778
#endif
2772
2779
2773
	if (unlikely(!test_bit(INITIALIZED, &wc->bit_flags)))
2780
	if (unlikely(!test_bit(INITIALIZED, &wc->bit_flags)))
2774
		return;
2781
		return;
Lines 2943-2949 static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_devi Link Here
2943
	spin_lock_init(&wc->reglock);
2950
	spin_lock_init(&wc->reglock);
2944
	INIT_LIST_HEAD(&wc->active_cmds);
2951
	INIT_LIST_HEAD(&wc->active_cmds);
2945
	INIT_LIST_HEAD(&wc->pending_cmds);
2952
	INIT_LIST_HEAD(&wc->pending_cmds);
2946
	setup_timer(&wc->timer, te12xp_timer, (unsigned long)wc);
2953
	timer_setup(&wc->timer, te12xp_timer, 0);
2947
2954
2948
#	if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
2955
#	if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
2949
	INIT_WORK(&wc->timer_work, timer_work_func, wc);
2956
	INIT_WORK(&wc->timer_work, timer_work_func, wc);
(-)a/drivers/dahdi/wcte13xp-base.c (-1 / +7 lines)
Lines 2381-2389 static void te13x_handle_interrupt(struct wcxb *xb, u32 pending) Link Here
2381
	}
2381
	}
2382
}
2382
}
2383
2383
2384
#ifndef init_timer
2385
static void te13xp_timer(struct timer_list *t)
2386
{
2387
	struct t13x *wc = from_timer(wc, t, timer);
2388
#else	/* Compatibility for pre 4.15 interface */
2384
static void te13xp_timer(unsigned long data)
2389
static void te13xp_timer(unsigned long data)
2385
{
2390
{
2386
	struct t13x *wc = (struct t13x *)data;
2391
	struct t13x *wc = (struct t13x *)data;
2392
#endif
2387
2393
2388
	if (unlikely(!test_bit(INITIALIZED, &wc->bit_flags)))
2394
	if (unlikely(!test_bit(INITIALIZED, &wc->bit_flags)))
2389
		return;
2395
		return;
Lines 2582-2588 static int __devinit te13xp_init_one(struct pci_dev *pdev, Link Here
2582
	wc->ledstate = -1;
2588
	wc->ledstate = -1;
2583
	spin_lock_init(&wc->reglock);
2589
	spin_lock_init(&wc->reglock);
2584
	mutex_init(&wc->lock);
2590
	mutex_init(&wc->lock);
2585
	setup_timer(&wc->timer, te13xp_timer, (unsigned long)wc);
2591
	timer_setup(&wc->timer, te13xp_timer, 0);
2586
2592
2587
#	if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
2593
#	if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
2588
	INIT_WORK(&wc->timer_work, timer_work_func, wc);
2594
	INIT_WORK(&wc->timer_work, timer_work_func, wc);
(-)a/drivers/dahdi/wcte43x-base.c (-1 / +7 lines)
Lines 3203-3211 static void t43x_handle_interrupt(struct wcxb *xb, u32 pending) Link Here
3203
		wc->intr_span = 0;
3203
		wc->intr_span = 0;
3204
}
3204
}
3205
3205
3206
#ifndef init_timer
3207
static void t43x_timer(struct timer_list *t)
3208
{
3209
	struct t43x *wc = from_timer(wc, t, timer);
3210
#else	/* Compatibility for pre 4.15 interface */
3206
static void t43x_timer(unsigned long data)
3211
static void t43x_timer(unsigned long data)
3207
{
3212
{
3208
	struct t43x *wc = (struct t43x *)data;
3213
	struct t43x *wc = (struct t43x *)data;
3214
#endif
3209
3215
3210
	if (!is_initialized(wc))
3216
	if (!is_initialized(wc))
3211
		return;
3217
		return;
Lines 3431-3437 static int __devinit t43x_init_one(struct pci_dev *pdev, Link Here
3431
		goto fail_exit;
3437
		goto fail_exit;
3432
3438
3433
	mutex_init(&wc->lock);
3439
	mutex_init(&wc->lock);
3434
	setup_timer(&wc->timer, t43x_timer, (unsigned long)wc);
3440
	timer_setup(&wc->timer, t43x_timer, 0);
3435
3441
3436
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
3442
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
3437
	INIT_WORK(&wc->timer_work, timer_work_func, wc);
3443
	INIT_WORK(&wc->timer_work, timer_work_func, wc);
(-)a/drivers/dahdi/xpp/xbus-core.c (-3 / +10 lines)
Lines 1350-1358 err: Link Here
1350
	return 0;
1350
	return 0;
1351
}
1351
}
1352
1352
1353
#ifndef init_timer
1354
static void xbus_command_timer(struct timer_list *t)
1355
{
1356
	xbus_t *xbus = from_timer(xbus, t, command_timer);
1357
#else
1353
static void xbus_command_timer(unsigned long param)
1358
static void xbus_command_timer(unsigned long param)
1354
{
1359
{
1355
	xbus_t *xbus = (xbus_t *)param;
1360
	xbus_t *xbus = (xbus_t *)param;
1361
#endif
1356
	struct timeval now;
1362
	struct timeval now;
1357
1363
1358
	BUG_ON(!xbus);
1364
	BUG_ON(!xbus);
Lines 1368-1375 void xbus_set_command_timer(xbus_t *xbus, bool on) Link Here
1368
	if (on) {
1374
	if (on) {
1369
		if (!timer_pending(&xbus->command_timer)) {
1375
		if (!timer_pending(&xbus->command_timer)) {
1370
			XBUS_DBG(SYNC, xbus, "add_timer\n");
1376
			XBUS_DBG(SYNC, xbus, "add_timer\n");
1371
			xbus->command_timer.function = xbus_command_timer;
1372
			xbus->command_timer.data = (unsigned long)xbus;
1373
			xbus->command_timer.expires = jiffies + 1;
1377
			xbus->command_timer.expires = jiffies + 1;
1374
			add_timer(&xbus->command_timer);
1378
			add_timer(&xbus->command_timer);
1375
		}
1379
		}
Lines 1642-1648 xbus_t *xbus_new(struct xbus_ops *ops, ushort max_send_size, Link Here
1642
	transport_init(xbus, ops, max_send_size, transport_device, priv);
1646
	transport_init(xbus, ops, max_send_size, transport_device, priv);
1643
	spin_lock_init(&xbus->lock);
1647
	spin_lock_init(&xbus->lock);
1644
	init_waitqueue_head(&xbus->command_queue_empty);
1648
	init_waitqueue_head(&xbus->command_queue_empty);
1645
	init_timer(&xbus->command_timer);
1649
	timer_setup(&xbus->command_timer, xbus_command_timer, 0);
1650
#ifdef init_timer
1651
	xbus->command_timer.data = (unsigned long)xbus;
1652
#endif
1646
	atomic_set(&xbus->pcm_rx_counter, 0);
1653
	atomic_set(&xbus->pcm_rx_counter, 0);
1647
	xbus->min_tx_sync = INT_MAX;
1654
	xbus->min_tx_sync = INT_MAX;
1648
	xbus->min_rx_sync = INT_MAX;
1655
	xbus->min_rx_sync = INT_MAX;
(-)a/include/dahdi/kernel.h (-1 / +10 lines)
Lines 1630-1635 struct mutex { Link Here
1630
	printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
1630
	printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
1631
#endif
1631
#endif
1632
1632
1633
1634
#ifdef init_timer	/* Compatibility for pre 4.15 interface */
1635
#define timer_setup(timer, func, flags) 	\
1636
	do { 					\
1637
		init_timer(timer); 		\
1638
		(timer)->function = (func);	\
1639
	} while (0)
1640
#endif
1641
1642
1633
/* If KBUILD_MODNAME is not defined in a compilation unit, then the dev_dbg
1643
/* If KBUILD_MODNAME is not defined in a compilation unit, then the dev_dbg
1634
 * macro will not work properly. */
1644
 * macro will not work properly. */
1635
#ifndef KBUILD_MODNAME
1645
#ifndef KBUILD_MODNAME
1636
- 

Return to bug 617876