]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/staging/ccree/ssi_fips.c
staging: most: dim2: replace function parameter with the expression
[mirror_ubuntu-bionic-kernel.git] / drivers / staging / ccree / ssi_fips.c
CommitLineData
16609980
GBY
1/*
2 * Copyright (C) 2012-2017 ARM Limited or its affiliates.
c8f17865 3 *
16609980
GBY
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
c8f17865 7 *
16609980
GBY
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
c8f17865 12 *
16609980
GBY
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, see <http://www.gnu.org/licenses/>.
15 */
16
17
18/**************************************************************
19This file defines the driver FIPS APIs *
20***************************************************************/
21
22#include <linux/module.h>
23#include "ssi_fips.h"
24
25
26extern int ssi_fips_ext_get_state(ssi_fips_state_t *p_state);
27extern int ssi_fips_ext_get_error(ssi_fips_error_t *p_err);
28
29/*
c8f17865
TI
30This function returns the REE FIPS state.
31It should be called by kernel module.
16609980
GBY
32*/
33int ssi_fips_get_state(ssi_fips_state_t *p_state)
34{
35 int rc = 0;
36
37 if (p_state == NULL) {
38 return -EINVAL;
39 }
40
41 rc = ssi_fips_ext_get_state(p_state);
42
43 return rc;
44}
45
46EXPORT_SYMBOL(ssi_fips_get_state);
47
48/*
c8f17865
TI
49This function returns the REE FIPS error.
50It should be called by kernel module.
16609980
GBY
51*/
52int ssi_fips_get_error(ssi_fips_error_t *p_err)
53{
54 int rc = 0;
55
56 if (p_err == NULL) {
57 return -EINVAL;
58 }
59
60 rc = ssi_fips_ext_get_error(p_err);
61
62 return rc;
63}
64
65EXPORT_SYMBOL(ssi_fips_get_error);