summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware/eicon/diva_dma.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-19 19:52:38 -0800
committerJoe Perches <joe@perches.com>2012-02-21 09:04:01 -0800
commit475be4d85a274d0961593db41cf85689db1d583c (patch)
treeb2b8931eb747794730522c3cf1898e46948527b9 /drivers/isdn/hardware/eicon/diva_dma.c
parent0b0a635f79f91f3755b6518627ea06dd0dbfd523 (diff)
downloadblackbird-op-linux-475be4d85a274d0961593db41cf85689db1d583c.tar.gz
blackbird-op-linux-475be4d85a274d0961593db41cf85689db1d583c.zip
isdn: whitespace coding style cleanup
isdn source code uses a not-current coding style. Update the coding style used on a per-line basis so that git diff -w shows only elided blank lines at EOF. Done with emacs and some scripts and some typing. Built x86 allyesconfig. No detected change in objdump -d or size. Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/isdn/hardware/eicon/diva_dma.c')
-rw-r--r--drivers/isdn/hardware/eicon/diva_dma.c116
1 files changed, 58 insertions, 58 deletions
diff --git a/drivers/isdn/hardware/eicon/diva_dma.c b/drivers/isdn/hardware/eicon/diva_dma.c
index f53a7407605f..217b6aa9f612 100644
--- a/drivers/isdn/hardware/eicon/diva_dma.c
+++ b/drivers/isdn/hardware/eicon/diva_dma.c
@@ -1,26 +1,26 @@
/*
*
- Copyright (c) Eicon Networks, 2002.
+ Copyright (c) Eicon Networks, 2002.
*
- This source file is supplied for the use with
- Eicon Networks range of DIVA Server Adapters.
+ This source file is supplied for the use with
+ Eicon Networks range of DIVA Server Adapters.
*
- Eicon File Revision : 2.1
+ Eicon File Revision : 2.1
*
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
*
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
*
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include "platform.h"
@@ -28,67 +28,67 @@
/*
Every entry has length of PAGE_SIZE
and represents one single physical page
- */
+*/
struct _diva_dma_map_entry {
- int busy;
- dword phys_bus_addr; /* 32bit address as seen by the card */
- void* local_ram_addr; /* local address as seen by the host */
- void* addr_handle; /* handle uset to free allocated memory */
+ int busy;
+ dword phys_bus_addr; /* 32bit address as seen by the card */
+ void *local_ram_addr; /* local address as seen by the host */
+ void *addr_handle; /* handle uset to free allocated memory */
};
/*
Create local mapping structure and init it to default state
- */
-struct _diva_dma_map_entry* diva_alloc_dma_map (void* os_context, int nentries) {
- diva_dma_map_entry_t* pmap = diva_os_malloc(0, sizeof(*pmap)*(nentries+1));
- if (pmap)
- memset (pmap, 0, sizeof(*pmap)*(nentries+1));
- return pmap;
+*/
+struct _diva_dma_map_entry *diva_alloc_dma_map(void *os_context, int nentries) {
+ diva_dma_map_entry_t *pmap = diva_os_malloc(0, sizeof(*pmap) * (nentries + 1));
+ if (pmap)
+ memset(pmap, 0, sizeof(*pmap) * (nentries + 1));
+ return pmap;
}
/*
Free local map (context should be freed before) if any
- */
-void diva_free_dma_mapping (struct _diva_dma_map_entry* pmap) {
- if (pmap) {
- diva_os_free (0, pmap);
- }
+*/
+void diva_free_dma_mapping(struct _diva_dma_map_entry *pmap) {
+ if (pmap) {
+ diva_os_free(0, pmap);
+ }
}
/*
Set information saved on the map entry
- */
-void diva_init_dma_map_entry (struct _diva_dma_map_entry* pmap,
- int nr, void* virt, dword phys,
- void* addr_handle) {
- pmap[nr].phys_bus_addr = phys;
- pmap[nr].local_ram_addr = virt;
- pmap[nr].addr_handle = addr_handle;
+*/
+void diva_init_dma_map_entry(struct _diva_dma_map_entry *pmap,
+ int nr, void *virt, dword phys,
+ void *addr_handle) {
+ pmap[nr].phys_bus_addr = phys;
+ pmap[nr].local_ram_addr = virt;
+ pmap[nr].addr_handle = addr_handle;
}
/*
Allocate one single entry in the map
- */
-int diva_alloc_dma_map_entry (struct _diva_dma_map_entry* pmap) {
- int i;
- for (i = 0; (pmap && pmap[i].local_ram_addr); i++) {
- if (!pmap[i].busy) {
- pmap[i].busy = 1;
- return (i);
- }
- }
- return (-1);
+*/
+int diva_alloc_dma_map_entry(struct _diva_dma_map_entry *pmap) {
+ int i;
+ for (i = 0; (pmap && pmap[i].local_ram_addr); i++) {
+ if (!pmap[i].busy) {
+ pmap[i].busy = 1;
+ return (i);
+ }
+ }
+ return (-1);
}
/*
Free one single entry in the map
- */
-void diva_free_dma_map_entry (struct _diva_dma_map_entry* pmap, int nr) {
- pmap[nr].busy = 0;
+*/
+void diva_free_dma_map_entry(struct _diva_dma_map_entry *pmap, int nr) {
+ pmap[nr].busy = 0;
}
/*
Get information saved on the map entry
- */
-void diva_get_dma_map_entry (struct _diva_dma_map_entry* pmap, int nr,
- void** pvirt, dword* pphys) {
- *pphys = pmap[nr].phys_bus_addr;
- *pvirt = pmap[nr].local_ram_addr;
+*/
+void diva_get_dma_map_entry(struct _diva_dma_map_entry *pmap, int nr,
+ void **pvirt, dword *pphys) {
+ *pphys = pmap[nr].phys_bus_addr;
+ *pvirt = pmap[nr].local_ram_addr;
}
-void* diva_get_entry_handle (struct _diva_dma_map_entry* pmap, int nr) {
- return (pmap[nr].addr_handle);
+void *diva_get_entry_handle(struct _diva_dma_map_entry *pmap, int nr) {
+ return (pmap[nr].addr_handle);
}
OpenPOWER on IntegriCloud