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

Collapse All | Expand All

(-)dahdi-linux-3.1.0-99appl/drivers/dahdi/ap400/ap400_drv.c (-3 / +12 lines)
Lines 87-92 Link Here
87
#ifndef IRQF_SHARED
87
#ifndef IRQF_SHARED
88
#define IRQF_SHARED		SA_SHIRQ
88
#define IRQF_SHARED		SA_SHIRQ
89
#endif
89
#endif
90
91
#ifndef IRQF_DISABLED
92
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
93
#define IRQF_DISABLED		SA_INTERRUPT
94
#else
95
/* Support for disabling interrupts was completely removed from Linux Kernel 5.4.0 */
96
#define IRQF_DISABLED		0x0
97
#endif
98
#endif
90
#ifndef __iomem
99
#ifndef __iomem
91
#define __iomem
100
#define __iomem
92
#endif
101
#endif
Lines 1707-1713 Link Here
1707
}
1716
}
1708
1717
1709
1718
1710
DAHDI_IRQ_HANDLER(ap4_interrupt)
1719
static irqreturn_t ap4_interrupt(int irq, void *dev_id)
1711
{
1720
{
1712
	struct ap4 *wc = dev_id;
1721
	struct ap4 *wc = dev_id;
1713
	unsigned long flags;
1722
	unsigned long flags;
Lines 2137-2143 Link Here
2137
		wc->tspans[x]->spanflags |= wc->dt->flags;
2146
		wc->tspans[x]->spanflags |= wc->dt->flags;
2138
	}
2147
	}
2139
2148
2140
	if (request_irq(pdev->irq, ap4_interrupt, IRQF_SHARED, "ap400", wc))
2149
	if (request_irq(pdev->irq, ap4_interrupt, IRQF_DISABLED | IRQF_SHARED, "ap400", wc))
2141
	{
2150
	{
2142
		printk("%s: Unable to request IRQ %d\n", wc->variety, pdev->irq);
2151
		printk("%s: Unable to request IRQ %d\n", wc->variety, pdev->irq);
2143
		res = -EIO;
2152
		res = -EIO;
Lines 2299-2305 Link Here
2299
{
2308
{
2300
	int res;
2309
	int res;
2301
	printk("Unified AP4XX PCI Card Driver\n");
2310
	printk("Unified AP4XX PCI Card Driver\n");
2302
	res = dahdi_pci_module(&ap4_driver);
2311
	res = pci_register_driver(&ap4_driver);
2303
	if (res) {
2312
	if (res) {
2304
		return -ENODEV;
2313
		return -ENODEV;
2305
	}
2314
	}
(-)dahdi-linux-3.1.0-99appl/drivers/dahdi/opvxa1200/base.c (-3 / +3 lines)
Lines 1347-1353 Link Here
1347
	wc->mod[card].fxs.lastrxhook = hook;
1347
	wc->mod[card].fxs.lastrxhook = hook;
1348
}
1348
}
1349
1349
1350
DAHDI_IRQ_HANDLER(wctdm_interrupt)
1350
static irqreturn_t wctdm_interrupt(int irq, void *dev_id)
1351
{
1351
{
1352
	struct wctdm *wc = dev_id;
1352
	struct wctdm *wc = dev_id;
1353
	unsigned char ints;
1353
	unsigned char ints;
Lines 2787-2793 Link Here
2787
			pci_set_drvdata(pdev, wc);
2787
			pci_set_drvdata(pdev, wc);
2788
2788
2789
2789
2790
			if (request_irq(pdev->irq, wctdm_interrupt, DAHDI_IRQ_SHARED, "opvxa1200", wc)) {
2790
			if (request_irq(pdev->irq, wctdm_interrupt, IRQF_SHARED, "opvxa1200", wc)) {
2791
				printk(KERN_NOTICE "opvxa1200: Unable to request IRQ %d\n", pdev->irq);
2791
				printk(KERN_NOTICE "opvxa1200: Unable to request IRQ %d\n", pdev->irq);
2792
				if (wc->freeregion & 0x01)
2792
				if (wc->freeregion & 0x01)
2793
					release_region(wc->ioaddr, 0xff);
2793
					release_region(wc->ioaddr, 0xff);
Lines 3021-3027 Link Here
3021
		battthresh = fxo_modes[_opermode].battthresh;
3021
		battthresh = fxo_modes[_opermode].battthresh;
3022
	}
3022
	}
3023
3023
3024
	res = dahdi_pci_module(&wctdm_driver);
3024
	res = pci_register_driver(&wctdm_driver);
3025
	if (res)
3025
	if (res)
3026
		return -ENODEV;
3026
		return -ENODEV;
3027
	return 0;
3027
	return 0;
(-)dahdi-linux-3.1.0-99appl/drivers/dahdi/opvxd115/base.c (-5 / +5 lines)
Lines 3574-3580 Link Here
3574
}
3574
}
3575
3575
3576
#ifdef SUPPORT_GEN1
3576
#ifdef SUPPORT_GEN1
3577
DAHDI_IRQ_HANDLER(t4_interrupt)
3577
static irqreturn_t t4_interrupt(int irq, void *dev_id)
3578
{
3578
{
3579
	struct t4 *wc = dev_id;
3579
	struct t4 *wc = dev_id;
3580
	unsigned long flags;
3580
	unsigned long flags;
Lines 3778-3784 Link Here
3778
#endif
3778
#endif
3779
}
3779
}
3780
3780
3781
DAHDI_IRQ_HANDLER(t4_interrupt_gen2)
3781
static irqreturn_t t4_interrupt_gen2(int irq, void *dev_id)
3782
{
3782
{
3783
	struct t4 *wc = dev_id;
3783
	struct t4 *wc = dev_id;
3784
	unsigned int status;
3784
	unsigned int status;
Lines 4693-4699 Link Here
4693
	t4_hardware_init_2(wc);
4693
	t4_hardware_init_2(wc);
4694
	
4694
	
4695
#ifdef SUPPORT_GEN1
4695
#ifdef SUPPORT_GEN1
4696
	if (request_irq(pdev->irq, (wc->flags & FLAG_2NDGEN) ? t4_interrupt_gen2 :t4_interrupt, DAHDI_IRQ_SHARED_DISABLED, "opvxd115", wc)) 
4696
	if (request_irq(pdev->irq, (wc->flags & FLAG_2NDGEN) ? t4_interrupt_gen2 :t4_interrupt, IRQF_SHARED, "opvxd115", wc)) 
4697
#else
4697
#else
4698
		if (!(wc->tspans[0]->spanflags & FLAG_2NDGEN)) {
4698
		if (!(wc->tspans[0]->spanflags & FLAG_2NDGEN)) {
4699
			dev_notice(&wc->dev->dev, "This driver does not "
4699
			dev_notice(&wc->dev->dev, "This driver does not "
Lines 4701-4707 Link Here
4701
			free_wc(wc);
4701
			free_wc(wc);
4702
			return -ENODEV;
4702
			return -ENODEV;
4703
		}	
4703
		}	
4704
			if (request_irq(pdev->irq, t4_interrupt_gen2, DAHDI_IRQ_SHARED_DISABLED, "opvxd115", wc)) 
4704
			if (request_irq(pdev->irq, t4_interrupt_gen2, IRQF_SHARED, "opvxd115", wc)) 
4705
#endif
4705
#endif
4706
	{
4706
	{
4707
		dev_notice(&wc->dev->dev, "opvxd115: Unable to request IRQ %d\n",
4707
		dev_notice(&wc->dev->dev, "opvxd115: Unable to request IRQ %d\n",
Lines 4848-4854 Link Here
4848
static int __init t4_init(void)
4848
static int __init t4_init(void)
4849
{
4849
{
4850
	int res;
4850
	int res;
4851
	res = dahdi_pci_module(&t4_driver);
4851
	res = pci_register_driver(&t4_driver);
4852
	if (res)
4852
	if (res)
4853
		return -ENODEV;
4853
		return -ENODEV;
4854
	/* initialize cards since we have all of them */
4854
	/* initialize cards since we have all of them */
(-)dahdi-linux-3.1.0-99appl/drivers/dahdi/opvxd115/vpm450m.c (-3 / +14 lines)
Lines 37-49 Link Here
37
UINT32 Oct6100UserGetTime(tPOCT6100_GET_TIME f_pTime)
37
UINT32 Oct6100UserGetTime(tPOCT6100_GET_TIME f_pTime)
38
{
38
{
39
	/* Why couldn't they just take a timeval like everyone else? */
39
	/* Why couldn't they just take a timeval like everyone else? */
40
	struct timeval tv;
40
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
41
	unsigned long long total_usecs;
41
        struct timeval tv;
42
#else
43
	struct timespec64 tv;
44
#endif	
45
        unsigned long long total_usecs;
42
	unsigned int mask = ~0;
46
	unsigned int mask = ~0;
43
	
47
48
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
44
	do_gettimeofday(&tv);
49
	do_gettimeofday(&tv);
45
	total_usecs = (((unsigned long long)(tv.tv_sec)) * 1000000) + 
50
	total_usecs = (((unsigned long long)(tv.tv_sec)) * 1000000) + 
46
				  (((unsigned long long)(tv.tv_usec)));
51
				  (((unsigned long long)(tv.tv_usec)));
52
#else
53
	ktime_get_real_ts64(&tv);
54
		total_usecs = (((unsigned long long)(tv.tv_sec)) * 1000000) +
55
				  (((unsigned long long)(tv.tv_nsec)) / 1000);
56
#endif
57
47
	f_pTime->aulWallTimeUs[0] = (total_usecs & mask);
58
	f_pTime->aulWallTimeUs[0] = (total_usecs & mask);
48
	f_pTime->aulWallTimeUs[1] = (total_usecs >> 32);
59
	f_pTime->aulWallTimeUs[1] = (total_usecs >> 32);
49
	return cOCT6100_ERR_OK;
60
	return cOCT6100_ERR_OK;
(-)dahdi-linux-3.1.0-99appl/drivers/dahdi/wcopenpci.c (-3 / +3 lines)
Lines 828-834 Link Here
828
	dahdi_receive(&wc->span);
828
	dahdi_receive(&wc->span);
829
}
829
}
830
830
831
DAHDI_IRQ_HANDLER(openpci_isr)
831
static irqreturn_t openpci_isr(int irq, void *dev_id)
832
{
832
{
833
	struct openpci *wc = dev_id;
833
	struct openpci *wc = dev_id;
834
	unsigned long flags;
834
	unsigned long flags;
Lines 1672-1678 Link Here
1672
	/* Enable bus mastering */
1672
	/* Enable bus mastering */
1673
	pci_set_master(pdev);
1673
	pci_set_master(pdev);
1674
1674
1675
	if (request_irq(pdev->irq, openpci_isr, DAHDI_IRQ_SHARED, NAME, wc)) {
1675
	if (request_irq(pdev->irq, openpci_isr, IRQF_SHARED, NAME, wc)) {
1676
		cardcrit(boardnum, "Cant get IRQ!");
1676
		cardcrit(boardnum, "Cant get IRQ!");
1677
		failret = -EIO;
1677
		failret = -EIO;
1678
		goto hell_5;
1678
		goto hell_5;
Lines 1762-1768 Link Here
1762
	return -ENODEV;
1762
	return -ENODEV;
1763
#endif
1763
#endif
1764
1764
1765
	if (dahdi_pci_module(&openpci_driver))
1765
	if (pci_register_driver(&openpci_driver))
1766
		return -ENODEV;
1766
		return -ENODEV;
1767
1767
1768
	info("Module loaded %s", debug ? "with debug enabled" : "");
1768
	info("Module loaded %s", debug ? "with debug enabled" : "");
(-)dahdi-linux-3.1.0-99appl/drivers/dahdi/zaphfc/base.c (-1 / +1 lines)
Lines 1664-1669 Link Here
1664
	hfc_proc_zaphfc_dir = proc_mkdir(hfc_DRIVER_NAME, proc_root_driver);
1664
	hfc_proc_zaphfc_dir = proc_mkdir(hfc_DRIVER_NAME, proc_root_driver);
1665
#endif
1665
#endif
1666
1666
1667
	ret = dahdi_pci_module(&hfc_driver);
1667
	ret = pci_register_driver(&hfc_driver);
1668
	return ret;
1668
	return ret;
1669
}
1669
}

Return to bug 705860