]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tpm: spi: Cleanup source code
authorMichal Simek <michal.simek@xilinx.com>
Fri, 6 Nov 2020 14:05:57 +0000 (15:05 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 20 Nov 2020 09:42:54 +0000 (10:42 +0100)
There is no need for GD to be used and priv variable is unused.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/tpm/tpm2_tis_spi.c

index 9a8145e6ba1f102ce78fc2f4222c2c9b80bc4557..0045bedf0c611d39379ee66366192b4e152d66eb 100644 (file)
@@ -30,8 +30,6 @@
 #include "tpm_tis.h"
 #include "tpm_internal.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define TPM_ACCESS(l)                  (0x0000 | ((l) << 12))
 #define TPM_INT_ENABLE(l)               (0x0008 | ((l) << 12))
 #define TPM_STS(l)                     (0x0018 | ((l) << 12))
@@ -520,7 +518,6 @@ static int tpm_tis_spi_cleanup(struct udevice *dev)
 static int tpm_tis_spi_open(struct udevice *dev)
 {
        struct tpm_chip *chip = dev_get_priv(dev);
-       struct tpm_chip_priv *priv = dev_get_uclass_priv(dev);
 
        if (chip->is_open)
                return -EBUSY;