| 1 |
Description: Make internal functions static |
| 2 |
Author: Simon Richter <[email protected]> |
| 3 |
Last-Update: 2013-01-08 |
| 4 |
|
| 5 |
Index: langford-0.0.20130228/langford.c |
| 6 |
=================================================================== |
| 7 |
--- langford-0.0.20130228.orig/langford.c |
| 8 |
+++ langford-0.0.20130228/langford.c |
| 9 |
@@ -54,7 +54,7 @@ static struct task_struct *dev_write_thr |
| 10 |
|
| 11 |
/**Figures out elements are used in a circular buffer |
| 12 |
*/ |
| 13 |
|
| 14 |
+static int circ_buff_filled(int start, int end, int len) { |
| 15 |
int rc; |
| 16 |
|
| 17 |
rc = end - start; |
| 18 |
@@ -69,7 +69,7 @@ int circ_buff_filled(int start, int end, |
| 19 |
|
| 20 |
/**Figures out how many elements of a circular buffer are available to be filled |
| 21 |
*/ |
| 22 |
|
| 23 |
+static int circ_buff_avail(int start, int end, int len) { |
| 24 |
return len - circ_buff_filled(start, end, len) - 1; |
| 25 |
}; |
| 26 |
|
| 27 |
@@ -81,7 +81,7 @@ This thread: |
| 28 |
- constantly performs read operations from the device via DMA |
| 29 |
- copy transferred rx data to cdev_read_buff |
| 30 |
*/ |
| 31 |
|
| 32 |
+static int dev_read_task(void *data) { |
| 33 |
int DescLevel; /*Descriptor FIFO level read from device*/ |
| 34 |
int DescActive, DescComp; /*Number of descriptors to be serviced and the number of completed descriptors*/ |
| 35 |
int BuffStart, BuffEnd; /*Indices to beginning and end of DMA buffers ring array (DevPrivData->RxDmaBuffsBusAddr)*/ |
| 36 |
@@ -222,7 +222,7 @@ This thread: |
| 37 |
- reads tx data from cdev_write_buff |
| 38 |
- constantly performs write operations to the device via DMA |
| 39 |
*/ |
| 40 |
|
| 41 |
+static int dev_write_task(void *data) { |
| 42 |
int DescLevel; /*Descriptor FIFO level read from device*/ |
| 43 |
int DescActive, DescComp; /*Number of descriptors to be serviced and the number of completed descriptors*/ |
| 44 |
int BuffStart, BuffEnd; /*Indices to beginning and end of DMA buffers ring array (DevPrivData->TxDmaBuffsBusAddr)*/ |
| 45 |
@@ -446,7 +446,7 @@ static ssize_t cdev_write(struct file *f |
| 46 |
|
| 47 |
/**Helper function for ioctrl (called ioctl handler and driver) |
| 48 |
*/ |
| 49 |
|
| 50 |
+static int ioctl_helper(int cmd, int *parg) { |
| 51 |
int AddrOffset; |
| 52 |
int BitOffset; |
| 53 |
|
| 54 |
@@ -696,7 +696,7 @@ static void destroy_dma_buffs(uint8_t ** |
| 55 |
State = 1 - Power on |
| 56 |
State = 0 - Power off |
| 57 |
*/ |
| 58 |
|
| 59 |
+static void PowerPeriph(int State) { |
| 60 |
int nState = !State; |
| 61 |
int Val1 = 1; |
| 62 |
State = !nState; |