From 61c3f95e0f22fa2d893f7bb3150a7e86ded7ad03 Mon Sep 17 00:00:00 2001
From: Anders Roxell <anders.roxell@linaro.org>
Date: Fri, 8 Feb 2019 13:34:19 +0100
Subject: [PATCH] tpm: i2c_infinion: remove unused input variable 'chip'

In both functions release_locality and check_locality, they have a input
variable 'struct tpm_chip *chip' that isn't used in the function, so
lets remove the variable.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/char/tpm/tpm_i2c_infineon.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/char/tpm/tpm_i2c_infineon.c b/drivers/char/tpm/tpm_i2c_infineon.c
index 9086edc9066b..c1f65f0827cb 100644
--- a/drivers/char/tpm/tpm_i2c_infineon.c
+++ b/drivers/char/tpm/tpm_i2c_infineon.c
@@ -314,7 +314,7 @@ enum tis_defaults {
 #define	TPM_DATA_FIFO(l)		(0x0005 | ((l) << 4))
 #define	TPM_DID_VID(l)			(0x0006 | ((l) << 4))
 
-static bool check_locality(struct tpm_chip *chip, int loc)
+static bool check_locality(int loc)
 {
 	u8 buf;
 	int rc;
@@ -333,7 +333,7 @@ static bool check_locality(struct tpm_chip *chip, int loc)
 }
 
 /* implementation similar to tpm_tis */
-static void release_locality(struct tpm_chip *chip, int loc, int force)
+static void release_locality(int loc, int force)
 {
 	u8 buf;
 	if (iic_tpm_read(TPM_ACCESS(loc), &buf, 1) < 0)
@@ -351,7 +351,7 @@ static int request_locality(struct tpm_chip *chip, int loc)
 	unsigned long stop;
 	u8 buf = TPM_ACCESS_REQUEST_USE;
 
-	if (check_locality(chip, loc))
+	if (check_locality(loc))
 		return loc;
 
 	iic_tpm_write(TPM_ACCESS(loc), &buf, 1);
@@ -359,7 +359,7 @@ static int request_locality(struct tpm_chip *chip, int loc)
 	/* wait for burstcount */
 	stop = jiffies + chip->timeout_a;
 	do {
-		if (check_locality(chip, loc))
+		if (check_locality(loc))
 			return loc;
 		usleep_range(TPM_TIMEOUT_US_LOW, TPM_TIMEOUT_US_HI);
 	} while (time_before(jiffies, stop));
@@ -515,7 +515,7 @@ static int tpm_tis_i2c_recv(struct tpm_chip *chip, u8 *buf, size_t count)
 	 * so we sleep rather than keeping the bus busy
 	 */
 	usleep_range(SLEEP_DURATION_RESET_LOW, SLEEP_DURATION_RESET_HI);
-	release_locality(chip, tpm_dev.locality, 0);
+	release_locality(tpm_dev.locality, 0);
 	return size;
 }
 
@@ -594,7 +594,7 @@ static int tpm_tis_i2c_send(struct tpm_chip *chip, u8 *buf, size_t len)
 	 * so we sleep rather than keeping the bus busy
 	 */
 	usleep_range(SLEEP_DURATION_RESET_LOW, SLEEP_DURATION_RESET_HI);
-	release_locality(chip, tpm_dev.locality, 0);
+	release_locality(tpm_dev.locality, 0);
 	return rc;
 }
 
@@ -659,7 +659,7 @@ static int tpm_tis_i2c_init(struct device *dev)
 
 	return tpm_chip_register(chip);
 out_release:
-	release_locality(chip, tpm_dev.locality, 1);
+	release_locality(tpm_dev.locality, 1);
 	tpm_dev.client = NULL;
 out_err:
 	return rc;
@@ -716,7 +716,7 @@ static int tpm_tis_i2c_remove(struct i2c_client *client)
 	struct tpm_chip *chip = tpm_dev.chip;
 
 	tpm_chip_unregister(chip);
-	release_locality(chip, tpm_dev.locality, 1);
+	release_locality(tpm_dev.locality, 1);
 	tpm_dev.client = NULL;
 
 	return 0;
-- 
2.20.1

