[svn-commits] fjoe: freebsd/trunk r9166 - in /freebsd/trunk: drivers/dahdi/ drivers/dahdi/v...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Aug 19 02:23:00 CDT 2010
Author: fjoe
Date: Thu Aug 19 02:22:56 2010
New Revision: 9166
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9166
Log:
Fix return value conversions (FreeBSD expects >0 return values, Linux <0 return values).
Modified:
freebsd/trunk/drivers/dahdi/voicebus/voicebus.c
freebsd/trunk/drivers/dahdi/wcfxo.c
freebsd/trunk/drivers/dahdi/wct4xxp/base.c
freebsd/trunk/drivers/dahdi/wctdm.c
freebsd/trunk/drivers/dahdi/wcte11xp.c
freebsd/trunk/freebsd/dahdi/bsd-compat.c
Modified: freebsd/trunk/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=9166&r1=9165&r2=9166
==============================================================================
--- freebsd/trunk/drivers/dahdi/voicebus/voicebus.c (original)
+++ freebsd/trunk/drivers/dahdi/voicebus/voicebus.c Thu Aug 19 02:22:56 2010
@@ -276,7 +276,7 @@
if ((cache_line_size = pci_read_config(vb->pdev->dev, 0x0c, 1)) == 0) {
dev_err(&vb->pdev->dev, "Failed read of cache line "
"size from PCI configuration space.\n");
- return EIO;
+ return -EIO;
}
#else /* !__FreeBSD__ */
if (pci_read_config_byte(vb->pdev, 0x0c, &cache_line_size)) {
@@ -1769,7 +1769,7 @@
vb->mem_res = bus_alloc_resource_any(vb->pdev->dev, SYS_RES_MEMORY, &vb->mem_rid, RF_ACTIVE);
if (vb->mem_res == NULL) {
device_printf(vb->pdev->dev, "Can't allocate memory resource\n");
- retval = ENXIO;
+ retval = -ENXIO;
goto cleanup;
}
#else /* !__FreeBSD__ */
@@ -1852,7 +1852,7 @@
vb->pdev->dev, SYS_RES_IRQ, &vb->irq_rid, RF_SHAREABLE | RF_ACTIVE);
if (vb->irq_res == NULL) {
dev_err(&vb->pdev->dev, "Can't allocate IRQ resource\n");
- retval = ENXIO;
+ retval = -ENXIO;
goto cleanup;
}
Modified: freebsd/trunk/drivers/dahdi/wcfxo.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wcfxo.c?view=diff&rev=9166&r1=9165&r2=9166
==============================================================================
--- freebsd/trunk/drivers/dahdi/wcfxo.c (original)
+++ freebsd/trunk/drivers/dahdi/wcfxo.c Thu Aug 19 02:22:56 2010
@@ -1165,7 +1165,7 @@
wc->dev->dev, SYS_RES_IRQ, &wc->irq_rid, RF_SHAREABLE | RF_ACTIVE);
if (wc->irq_res == NULL) {
device_printf(wc->dev->dev, "Can't allocate irq resource\n");
- return (ENXIO);
+ return (-ENXIO);
}
error = bus_setup_intr(
@@ -1173,7 +1173,7 @@
wcfxo_interrupt, NULL, wc, &wc->irq_handle);
if (error) {
device_printf(wc->dev->dev, "Can't setup interrupt handler (error %d)\n", error);
- return (ENXIO);
+ return (-ENXIO);
}
return (0);
@@ -1249,7 +1249,7 @@
goto err;
if (wcfxo_initialize(wc) < 0) {
- res = ENXIO;
+ res = -ENXIO;
goto err;
}
@@ -1264,7 +1264,7 @@
/* initialize DAA (after it's started) */
if (wcfxo_init_daa(wc)) {
printk(KERN_NOTICE "Failed to initailize DAA, giving up...\n");
- res = ENXIO;
+ res = -ENXIO;
goto err;
}
wcfxo_set_daa_mode(wc);
@@ -1283,7 +1283,7 @@
/* release resources */
wcfxo_release_resources(wc);
- return (res);
+ return (-res);
}
static int
Modified: freebsd/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=9166&r1=9165&r2=9166
==============================================================================
--- freebsd/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ freebsd/trunk/drivers/dahdi/wct4xxp/base.c Thu Aug 19 02:22:56 2010
@@ -3385,13 +3385,13 @@
res = dahdi_dma_allocate(wc->dev->dev, numbufs * T4_BASE_SIZE, &write_dma_tag, &write_dma_map,
&writechunk, &writedma);
if (res)
- return -res;
+ return res;
res = dahdi_dma_allocate(wc->dev->dev, numbufs * T4_BASE_SIZE, &read_dma_tag, &read_dma_map,
&readchunk, &readdma);
if (res) {
dahdi_dma_free(&write_dma_tag, &write_dma_map, &writechunk, &writedma);
- return -res;
+ return res;
}
wc->readchunk = (unsigned int *) readchunk;
Modified: freebsd/trunk/drivers/dahdi/wctdm.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wctdm.c?view=diff&rev=9166&r1=9165&r2=9166
==============================================================================
--- freebsd/trunk/drivers/dahdi/wctdm.c (original)
+++ freebsd/trunk/drivers/dahdi/wctdm.c Thu Aug 19 02:22:56 2010
@@ -2908,7 +2908,7 @@
wc->dev->dev, SYS_RES_IRQ, &wc->irq_rid, RF_SHAREABLE | RF_ACTIVE);
if (wc->irq_res == NULL) {
device_printf(wc->dev->dev, "Can't allocate irq resource\n");
- return (ENXIO);
+ return (-ENXIO);
}
error = bus_setup_intr(
@@ -2916,7 +2916,7 @@
wctdm_interrupt, NULL, wc, &wc->irq_handle);
if (error) {
device_printf(wc->dev->dev, "Can't setup interrupt handler (error %d)\n", error);
- return (ENXIO);
+ return (-ENXIO);
}
return (0);
@@ -3000,12 +3000,12 @@
if (wctdm_initialize(wc) < 0) {
printk(KERN_NOTICE "wctdm: Unable to intialize FXS\n");
- res = ENXIO;
+ res = -ENXIO;
goto err;
}
if (wctdm_hardware_init(wc)) {
- res = ENXIO;
+ res = -ENXIO;
goto err;
}
@@ -3037,7 +3037,7 @@
/* release resources */
wctdm_release_resources(wc);
- return (res);
+ return (-res);
}
static int
Modified: freebsd/trunk/drivers/dahdi/wcte11xp.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wcte11xp.c?view=diff&rev=9166&r1=9165&r2=9166
==============================================================================
--- freebsd/trunk/drivers/dahdi/wcte11xp.c (original)
+++ freebsd/trunk/drivers/dahdi/wcte11xp.c Thu Aug 19 02:22:56 2010
@@ -1702,7 +1702,7 @@
wc->dev->dev, SYS_RES_IRQ, &wc->irq_rid, RF_SHAREABLE | RF_ACTIVE);
if (wc->irq_res == NULL) {
device_printf(wc->dev->dev, "Can't allocate irq resource\n");
- return (ENXIO);
+ return (-ENXIO);
}
error = bus_setup_intr(
@@ -1710,7 +1710,7 @@
t1xxp_interrupt, NULL, wc, &wc->irq_handle);
if (error) {
device_printf(wc->dev->dev, "Can't setup interrupt handler (error %d)\n", error);
- return (ENXIO);
+ return (-ENXIO);
}
return (0);
@@ -1757,7 +1757,7 @@
wc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &wc->io_rid, RF_ACTIVE);
if (wc->io_res == NULL) {
device_printf(dev, "Can't allocate IO resource\n");
- res = ENXIO;
+ res = -ENXIO;
goto err;
}
@@ -1797,7 +1797,7 @@
/* Misc. software stuff */
if (t1xxp_software_init(wc) < 0) {
- res = ENXIO;
+ res = -ENXIO;
goto err;
}
@@ -1808,7 +1808,7 @@
/* release resources */
t1xxp_release_resources(wc);
spin_lock_destroy(&wc->lock);
- return (res);
+ return (-res);
}
static int
Modified: freebsd/trunk/freebsd/dahdi/bsd-compat.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/freebsd/dahdi/bsd-compat.c?view=diff&rev=9166&r1=9165&r2=9166
==============================================================================
--- freebsd/trunk/freebsd/dahdi/bsd-compat.c (original)
+++ freebsd/trunk/freebsd/dahdi/bsd-compat.c Thu Aug 19 02:22:56 2010
@@ -460,13 +460,13 @@
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
size, 1, size, BUS_DMA_ALLOCNOW, NULL, NULL, ptag);
if (res)
- return (res);
+ return (-res);
res = bus_dmamem_alloc(*ptag, pvaddr, BUS_DMA_NOWAIT | BUS_DMA_ZERO, pmap);
if (res) {
bus_dma_tag_destroy(*ptag);
*ptag = NULL;
- return (res);
+ return (-res);
}
res = bus_dmamap_load(*ptag, *pmap, *pvaddr, size, dahdi_dma_map_addr, ppaddr, 0);
@@ -479,7 +479,7 @@
bus_dma_tag_destroy(*ptag);
*ptag = NULL;
- return (res);
+ return (-res);
}
return (0);
More information about the svn-commits
mailing list