Commit 88fca80e authored by Shashank Gupta's avatar Shashank Gupta Committed by Herbert Xu

crypto: qat - make state machine functions static

The state machine functions adf_dev_init(), adf_dev_start(),
adf_dev_stop() adf_dev_shutdown() and adf_dev_shutdown_cache_cfg()
are only used internally within adf_init.c.
Do not export these functions and make them static as state transitions
are now performed using the safe function adf_dev_up() and
adf_dev_down().

This commit does not implement any functional change.
Signed-off-by: default avatarShashank Gupta <shashank.gupta@intel.com>
Reviewed-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b97c5377
...@@ -52,12 +52,6 @@ struct service_hndl { ...@@ -52,12 +52,6 @@ struct service_hndl {
int adf_service_register(struct service_hndl *service); int adf_service_register(struct service_hndl *service);
int adf_service_unregister(struct service_hndl *service); int adf_service_unregister(struct service_hndl *service);
int adf_dev_init(struct adf_accel_dev *accel_dev);
int adf_dev_start(struct adf_accel_dev *accel_dev);
void adf_dev_stop(struct adf_accel_dev *accel_dev);
void adf_dev_shutdown(struct adf_accel_dev *accel_dev);
int adf_dev_shutdown_cache_cfg(struct adf_accel_dev *accel_dev);
int adf_dev_up(struct adf_accel_dev *accel_dev, bool init_config); int adf_dev_up(struct adf_accel_dev *accel_dev, bool init_config);
int adf_dev_down(struct adf_accel_dev *accel_dev, bool cache_config); int adf_dev_down(struct adf_accel_dev *accel_dev, bool cache_config);
int adf_dev_restart(struct adf_accel_dev *accel_dev); int adf_dev_restart(struct adf_accel_dev *accel_dev);
......
...@@ -56,7 +56,7 @@ int adf_service_unregister(struct service_hndl *service) ...@@ -56,7 +56,7 @@ int adf_service_unregister(struct service_hndl *service)
* *
* Return: 0 on success, error code otherwise. * Return: 0 on success, error code otherwise.
*/ */
int adf_dev_init(struct adf_accel_dev *accel_dev) static int adf_dev_init(struct adf_accel_dev *accel_dev)
{ {
struct service_hndl *service; struct service_hndl *service;
struct list_head *list_itr; struct list_head *list_itr;
...@@ -146,7 +146,6 @@ int adf_dev_init(struct adf_accel_dev *accel_dev) ...@@ -146,7 +146,6 @@ int adf_dev_init(struct adf_accel_dev *accel_dev)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(adf_dev_init);
/** /**
* adf_dev_start() - Start acceleration service for the given accel device * adf_dev_start() - Start acceleration service for the given accel device
...@@ -158,7 +157,7 @@ EXPORT_SYMBOL_GPL(adf_dev_init); ...@@ -158,7 +157,7 @@ EXPORT_SYMBOL_GPL(adf_dev_init);
* *
* Return: 0 on success, error code otherwise. * Return: 0 on success, error code otherwise.
*/ */
int adf_dev_start(struct adf_accel_dev *accel_dev) static int adf_dev_start(struct adf_accel_dev *accel_dev)
{ {
struct adf_hw_device_data *hw_data = accel_dev->hw_device; struct adf_hw_device_data *hw_data = accel_dev->hw_device;
struct service_hndl *service; struct service_hndl *service;
...@@ -219,7 +218,6 @@ int adf_dev_start(struct adf_accel_dev *accel_dev) ...@@ -219,7 +218,6 @@ int adf_dev_start(struct adf_accel_dev *accel_dev)
} }
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(adf_dev_start);
/** /**
* adf_dev_stop() - Stop acceleration service for the given accel device * adf_dev_stop() - Stop acceleration service for the given accel device
...@@ -231,7 +229,7 @@ EXPORT_SYMBOL_GPL(adf_dev_start); ...@@ -231,7 +229,7 @@ EXPORT_SYMBOL_GPL(adf_dev_start);
* *
* Return: void * Return: void
*/ */
void adf_dev_stop(struct adf_accel_dev *accel_dev) static void adf_dev_stop(struct adf_accel_dev *accel_dev)
{ {
struct service_hndl *service; struct service_hndl *service;
struct list_head *list_itr; struct list_head *list_itr;
...@@ -276,7 +274,6 @@ void adf_dev_stop(struct adf_accel_dev *accel_dev) ...@@ -276,7 +274,6 @@ void adf_dev_stop(struct adf_accel_dev *accel_dev)
clear_bit(ADF_STATUS_AE_STARTED, &accel_dev->status); clear_bit(ADF_STATUS_AE_STARTED, &accel_dev->status);
} }
} }
EXPORT_SYMBOL_GPL(adf_dev_stop);
/** /**
* adf_dev_shutdown() - shutdown acceleration services and data strucutures * adf_dev_shutdown() - shutdown acceleration services and data strucutures
...@@ -285,7 +282,7 @@ EXPORT_SYMBOL_GPL(adf_dev_stop); ...@@ -285,7 +282,7 @@ EXPORT_SYMBOL_GPL(adf_dev_stop);
* Cleanup the ring data structures and the admin comms and arbitration * Cleanup the ring data structures and the admin comms and arbitration
* services. * services.
*/ */
void adf_dev_shutdown(struct adf_accel_dev *accel_dev) static void adf_dev_shutdown(struct adf_accel_dev *accel_dev)
{ {
struct adf_hw_device_data *hw_data = accel_dev->hw_device; struct adf_hw_device_data *hw_data = accel_dev->hw_device;
struct service_hndl *service; struct service_hndl *service;
...@@ -343,7 +340,6 @@ void adf_dev_shutdown(struct adf_accel_dev *accel_dev) ...@@ -343,7 +340,6 @@ void adf_dev_shutdown(struct adf_accel_dev *accel_dev)
adf_cleanup_etr_data(accel_dev); adf_cleanup_etr_data(accel_dev);
adf_dev_restore(accel_dev); adf_dev_restore(accel_dev);
} }
EXPORT_SYMBOL_GPL(adf_dev_shutdown);
int adf_dev_restarting_notify(struct adf_accel_dev *accel_dev) int adf_dev_restarting_notify(struct adf_accel_dev *accel_dev)
{ {
...@@ -375,7 +371,7 @@ int adf_dev_restarted_notify(struct adf_accel_dev *accel_dev) ...@@ -375,7 +371,7 @@ int adf_dev_restarted_notify(struct adf_accel_dev *accel_dev)
return 0; return 0;
} }
int adf_dev_shutdown_cache_cfg(struct adf_accel_dev *accel_dev) static int adf_dev_shutdown_cache_cfg(struct adf_accel_dev *accel_dev)
{ {
char services[ADF_CFG_MAX_VAL_LEN_IN_BYTES] = {0}; char services[ADF_CFG_MAX_VAL_LEN_IN_BYTES] = {0};
int ret; int ret;
......
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