Commit 91410066 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman

Staging: sep: squish some of the wrapper functions

Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b6368033
...@@ -195,11 +195,6 @@ static DECLARE_WAIT_QUEUE_HEAD(g_sep_event); ...@@ -195,11 +195,6 @@ static DECLARE_WAIT_QUEUE_HEAD(g_sep_event);
*/ */
static int sep_register_driver_to_fs(void); static int sep_register_driver_to_fs(void);
/*
this function unregisters driver from fs
*/
static void sep_unregister_driver_from_fs(void);
/* /*
this function calculates the size of data that can be inserted into the lli this function calculates the size of data that can be inserted into the lli
table from this array the condition is that either the table is full table from this array the condition is that either the table is full
...@@ -382,14 +377,6 @@ static int sep_lock_user_pages(unsigned long app_virt_addr, unsigned long data_s ...@@ -382,14 +377,6 @@ static int sep_lock_user_pages(unsigned long app_virt_addr, unsigned long data_s
FUNCTIONS FUNCTIONS
-----------------------------------------------*/ -----------------------------------------------*/
/*
This functions locks the area of the resisnd and cache sep code
*/
static void sep_lock_cache_resident_area(void)
{
return;
}
/* /*
This functions copies the cache and resident from their source location into This functions copies the cache and resident from their source location into
destination memory, which is external to Linux VM and is given as destination memory, which is external to Linux VM and is given as
...@@ -2202,9 +2189,6 @@ static int sep_realloc_cache_resident_handler(unsigned long arg) ...@@ -2202,9 +2189,6 @@ static int sep_realloc_cache_resident_handler(unsigned long arg)
if (error) if (error)
goto end_function; goto end_function;
/* lock the area (if needed) */
sep_lock_cache_resident_area();
command_args.new_base_addr = sep_dev->phys_shared_area_addr; command_args.new_base_addr = sep_dev->phys_shared_area_addr;
/* find the new base address according to the lowest address between /* find the new base address according to the lowest address between
...@@ -2765,17 +2749,6 @@ static struct pci_driver sep_pci_driver = { ...@@ -2765,17 +2749,6 @@ static struct pci_driver sep_pci_driver = {
.probe = sep_probe .probe = sep_probe
}; };
/*
this function registers th driver to
the device subsystem( either PCI, USB, etc)
*/
static int sep_register_driver_to_device(void)
{
return pci_register_driver(&sep_pci_driver);
}
/* major and minor device numbers */ /* major and minor device numbers */
static dev_t sep_devno; static dev_t sep_devno;
...@@ -2827,16 +2800,6 @@ end_function: ...@@ -2827,16 +2800,6 @@ end_function:
return ret_val; return ret_val;
} }
/*
this function unregisters driver from fs
*/
static void sep_unregister_driver_from_fs(void)
{
cdev_del(&sep_cdev);
/* unregister dev numbers */
unregister_chrdev_region(sep_devno, 1);
}
/*-------------------------------------------------------------- /*--------------------------------------------------------------
init function init function
...@@ -2864,7 +2827,8 @@ static int __init sep_init(void) ...@@ -2864,7 +2827,8 @@ static int __init sep_init(void)
/* set the starting mode to blocking */ /* set the starting mode to blocking */
sep_dev->block_mode_flag = 1; sep_dev->block_mode_flag = 1;
ret_val = sep_register_driver_to_device(); /* FIXME: Probe can occur before we are ready to survive a probe */
ret_val = pci_register_driver(&sep_pci_driver);
if (ret_val) { if (ret_val) {
edbg("sep_driver:sep_driver_to_device failed, ret_val is %d\n", ret_val); edbg("sep_driver:sep_driver_to_device failed, ret_val is %d\n", ret_val);
goto end_function_unregister_from_fs; goto end_function_unregister_from_fs;
...@@ -2920,7 +2884,9 @@ static int __init sep_init(void) ...@@ -2920,7 +2884,9 @@ static int __init sep_init(void)
goto end_function; goto end_function;
end_function_unregister_from_fs: end_function_unregister_from_fs:
/* unregister from fs */ /* unregister from fs */
sep_unregister_driver_from_fs(); cdev_del(&sep_cdev);
/* unregister dev numbers */
unregister_chrdev_region(sep_devno, 1);
end_function_deallocate_sep_shared_area: end_function_deallocate_sep_shared_area:
/* de-allocate shared area */ /* de-allocate shared area */
sep_unmap_and_free_shared_area(size, sep_dev->shared_area_addr, sep_dev->phys_shared_area_addr); sep_unmap_and_free_shared_area(size, sep_dev->shared_area_addr, sep_dev->phys_shared_area_addr);
...@@ -2944,7 +2910,9 @@ static void __exit sep_exit(void) ...@@ -2944,7 +2910,9 @@ static void __exit sep_exit(void)
dbg("SEP Driver:--------> Exit start\n"); dbg("SEP Driver:--------> Exit start\n");
/* unregister from fs */ /* unregister from fs */
sep_unregister_driver_from_fs(); cdev_del(&sep_cdev);
/* unregister dev numbers */
unregister_chrdev_region(sep_devno, 1);
/* calculate the total size for de-allocation */ /* calculate the total size for de-allocation */
size = SEP_DRIVER_MESSAGE_SHARED_AREA_SIZE_IN_BYTES + size = SEP_DRIVER_MESSAGE_SHARED_AREA_SIZE_IN_BYTES +
SEP_DRIVER_SYNCHRONIC_DMA_TABLES_AREA_SIZE_IN_BYTES + SEP_DRIVER_DATA_POOL_SHARED_AREA_SIZE_IN_BYTES + SEP_DRIVER_FLOW_DMA_TABLES_AREA_SIZE_IN_BYTES + SEP_DRIVER_STATIC_AREA_SIZE_IN_BYTES + SEP_DRIVER_SYSTEM_DATA_MEMORY_SIZE_IN_BYTES; SEP_DRIVER_SYNCHRONIC_DMA_TABLES_AREA_SIZE_IN_BYTES + SEP_DRIVER_DATA_POOL_SHARED_AREA_SIZE_IN_BYTES + SEP_DRIVER_FLOW_DMA_TABLES_AREA_SIZE_IN_BYTES + SEP_DRIVER_STATIC_AREA_SIZE_IN_BYTES + SEP_DRIVER_SYSTEM_DATA_MEMORY_SIZE_IN_BYTES;
......
...@@ -41,11 +41,6 @@ this function loads the ROM code in SEP (needed only in the debug mode on FPGA) ...@@ -41,11 +41,6 @@ this function loads the ROM code in SEP (needed only in the debug mode on FPGA)
*/ */
static void sep_load_rom_code(void); static void sep_load_rom_code(void);
/*
This functions locks the area of the resident and cache sep code (if possible)
*/
static void sep_lock_cache_resident_area(void);
/* /*
This functions copies the cache and resident from their source location into This functions copies the cache and resident from their source location into
destination memory, which is external to Linux VM and is given as physical destination memory, which is external to Linux VM and is given as physical
...@@ -86,10 +81,4 @@ to the physical address. It can be either on the externa RAM device ...@@ -86,10 +81,4 @@ to the physical address. It can be either on the externa RAM device
*/ */
static unsigned long sep_shared_area_phys_to_virt(unsigned long phys_address); static unsigned long sep_shared_area_phys_to_virt(unsigned long phys_address);
/*
This function registers th driver to the device
subsystem (either PCI, USB, etc)
*/
static int sep_register_driver_to_device(void);
#endif /*__SEP_DRIVER_EXT_API_H__*/ #endif /*__SEP_DRIVER_EXT_API_H__*/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment