diff mbox series

[2/8,v6] tpm: refactor function names for LPC based TPMs

Message ID 20211107213312.263357-3-ilias.apalodimas@linaro.org
State Superseded
Headers show
Series TPM cleanups and MMIO driver | expand

Commit Message

Ilias Apalodimas Nov. 7, 2021, 9:33 p.m. UTC
With the upcoming TPM2 API, some of the function names are part of the new
header file.  So switch conflicting driver defined function names and
defines.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
 drivers/tpm/tpm_tis_lpc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Glass Nov. 8, 2021, 3:58 p.m. UTC | #1
On Sun, 7 Nov 2021 at 14:33, Ilias Apalodimas
<ilias.apalodimas@linaro.org> wrote:
>
> With the upcoming TPM2 API, some of the function names are part of the new
> header file.  So switch conflicting driver defined function names and
> defines.
>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> ---
>  drivers/tpm/tpm_tis_lpc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt Nov. 8, 2021, 4:01 p.m. UTC | #2
On 11/7/21 22:33, Ilias Apalodimas wrote:
> With the upcoming TPM2 API, some of the function names are part of the new
> header file.  So switch conflicting driver defined function names and
> defines.
> 
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canaonical.com>

> ---
>   drivers/tpm/tpm_tis_lpc.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tpm/tpm_tis_lpc.c b/drivers/tpm/tpm_tis_lpc.c
> index 003c0d8816d0..13a133d58ebd 100644
> --- a/drivers/tpm/tpm_tis_lpc.c
> +++ b/drivers/tpm/tpm_tis_lpc.c
> @@ -443,7 +443,7 @@ static int tpm_tis_lpc_open(struct udevice *dev)
>   	return 0;
>   }
>   
> -static int tpm_tis_get_desc(struct udevice *dev, char *buf, int size)
> +static int tpm_tis_lpc_get_desc(struct udevice *dev, char *buf, int size)
>   {
>   	ulong chip_type = dev_get_driver_data(dev);
>   
> @@ -458,7 +458,7 @@ static int tpm_tis_get_desc(struct udevice *dev, char *buf, int size)
>   static const struct tpm_ops tpm_tis_lpc_ops = {
>   	.open		= tpm_tis_lpc_open,
>   	.close		= tpm_tis_lpc_close,
> -	.get_desc	= tpm_tis_get_desc,
> +	.get_desc	= tpm_tis_lpc_get_desc,
>   	.send		= tis_senddata,
>   	.recv		= tis_readresponse,
>   };
>
diff mbox series

Patch

diff --git a/drivers/tpm/tpm_tis_lpc.c b/drivers/tpm/tpm_tis_lpc.c
index 003c0d8816d0..13a133d58ebd 100644
--- a/drivers/tpm/tpm_tis_lpc.c
+++ b/drivers/tpm/tpm_tis_lpc.c
@@ -443,7 +443,7 @@  static int tpm_tis_lpc_open(struct udevice *dev)
 	return 0;
 }
 
-static int tpm_tis_get_desc(struct udevice *dev, char *buf, int size)
+static int tpm_tis_lpc_get_desc(struct udevice *dev, char *buf, int size)
 {
 	ulong chip_type = dev_get_driver_data(dev);
 
@@ -458,7 +458,7 @@  static int tpm_tis_get_desc(struct udevice *dev, char *buf, int size)
 static const struct tpm_ops tpm_tis_lpc_ops = {
 	.open		= tpm_tis_lpc_open,
 	.close		= tpm_tis_lpc_close,
-	.get_desc	= tpm_tis_get_desc,
+	.get_desc	= tpm_tis_lpc_get_desc,
 	.send		= tis_senddata,
 	.recv		= tis_readresponse,
 };