aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorKent Yoder <key@linux.vnet.ibm.com>2013-01-29 10:43:54 -0500
committerKent Yoder <key@linux.vnet.ibm.com>2013-02-05 10:38:25 -0500
commitd479042c82941772cb1c003b46707d55185a49f6 (patch)
tree8c9fcfd62cb396d9c694bcc89efef74e3d4e99c4 /drivers/char
parent7240b98320a28f1d41b9361dc1cc8244dfda0272 (diff)
tpm_i2c_stm_st33: removed unused variables/code
Reported-by: Peter Hüwe <PeterHuewe@gmx.de> Signed-off-by: Peter Hüwe <PeterHuewe@gmx.de> Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm_i2c_stm_st33.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/char/tpm/tpm_i2c_stm_st33.c b/drivers/char/tpm/tpm_i2c_stm_st33.c
index e4154bfc8be7..8c60d33d116c 100644
--- a/drivers/char/tpm/tpm_i2c_stm_st33.c
+++ b/drivers/char/tpm/tpm_i2c_stm_st33.c
@@ -123,9 +123,6 @@ static int read8_reg(struct i2c_client *client, u8 tpm_register,
123{ 123{
124 u8 status = 0; 124 u8 status = 0;
125 u8 data; 125 u8 data;
126 struct st33zp24_platform_data *pin_infos;
127
128 pin_infos = client->dev.platform_data;
129 126
130 data = TPM_DUMMY_BYTE; 127 data = TPM_DUMMY_BYTE;
131 status = write8_reg(client, tpm_register, &data, 1); 128 status = write8_reg(client, tpm_register, &data, 1);
@@ -203,10 +200,8 @@ static int wait_for_serirq_timeout(struct tpm_chip *chip, bool condition,
203{ 200{
204 int status = 2; 201 int status = 2;
205 struct i2c_client *client; 202 struct i2c_client *client;
206 struct st33zp24_platform_data *pin_infos;
207 203
208 client = (struct i2c_client *) TPM_VPRIV(chip); 204 client = (struct i2c_client *) TPM_VPRIV(chip);
209 pin_infos = client->dev.platform_data;
210 205
211 status = _wait_for_interrupt_serirq_timeout(chip, timeout); 206 status = _wait_for_interrupt_serirq_timeout(chip, timeout);
212 if (!status) { 207 if (!status) {
@@ -462,13 +457,11 @@ static irqreturn_t tpm_ioserirq_handler(int irq, void *dev_id)
462static int tpm_stm_i2c_send(struct tpm_chip *chip, unsigned char *buf, 457static int tpm_stm_i2c_send(struct tpm_chip *chip, unsigned char *buf,
463 size_t len) 458 size_t len)
464{ 459{
465 u32 ordinal, 460 u32 status,
466 status,
467 burstcnt = 0, i, size; 461 burstcnt = 0, i, size;
468 int ret; 462 int ret;
469 u8 data; 463 u8 data;
470 struct i2c_client *client; 464 struct i2c_client *client;
471 struct st33zp24_platform_data *pin_infos;
472 465
473 if (chip == NULL) 466 if (chip == NULL)
474 return -EBUSY; 467 return -EBUSY;
@@ -476,9 +469,6 @@ static int tpm_stm_i2c_send(struct tpm_chip *chip, unsigned char *buf,
476 return -EBUSY; 469 return -EBUSY;
477 470
478 client = (struct i2c_client *)TPM_VPRIV(chip); 471 client = (struct i2c_client *)TPM_VPRIV(chip);
479 pin_infos = client->dev.platform_data;
480
481 ordinal = be32_to_cpu(*((__be32 *) (buf + 6)));
482 472
483 client->flags = 0; 473 client->flags = 0;
484 474
@@ -547,15 +537,9 @@ static int tpm_stm_i2c_recv(struct tpm_chip *chip, unsigned char *buf,
547 int size = 0; 537 int size = 0;
548 int expected; 538 int expected;
549 539
550 struct i2c_client *client;
551 struct st33zp24_platform_data *pin_infos;
552
553 if (chip == NULL) 540 if (chip == NULL)
554 return -EBUSY; 541 return -EBUSY;
555 542
556 client = (struct i2c_client *)TPM_VPRIV(chip);
557 pin_infos = client->dev.platform_data;
558
559 if (count < TPM_HEADER_SIZE) { 543 if (count < TPM_HEADER_SIZE) {
560 size = -EIO; 544 size = -EIO;
561 goto out; 545 goto out;