diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2012-01-20 12:58:50 -0500 |
---|---|---|
committer | Rajiv Andrade <srajiv@linux.vnet.ibm.com> | 2012-02-14 13:43:18 -0500 |
commit | 968de8e24d08fcc425e112ca465d4688b89b777b (patch) | |
tree | 729714da77b246a8273b04be4220ea11d1bbacec /drivers/char/tpm/tpm_tis.c | |
parent | 4e401fb028b79105ed87d85fc2220c77be277ed9 (diff) |
tpm_tis: Clean up after module_param cleanup
Commit 90ab5ee94171b3e28de6bb42ee30b527014e0be7 changed the
itpm module parameter from int to bool. Some other changes
need to be done to clean up after this change.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Diffstat (limited to 'drivers/char/tpm/tpm_tis.c')
-rw-r--r-- | drivers/char/tpm/tpm_tis.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 47ba9c213cc1..1250e3323c43 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
@@ -367,7 +367,7 @@ static int probe_itpm(struct tpm_chip *chip) | |||
367 | 0x00, 0x00, 0x00, 0xf1 | 367 | 0x00, 0x00, 0x00, 0xf1 |
368 | }; | 368 | }; |
369 | size_t len = sizeof(cmd_getticks); | 369 | size_t len = sizeof(cmd_getticks); |
370 | int rem_itpm = itpm; | 370 | bool rem_itpm = itpm; |
371 | u16 vendor = ioread16(chip->vendor.iobase + TPM_DID_VID(0)); | 371 | u16 vendor = ioread16(chip->vendor.iobase + TPM_DID_VID(0)); |
372 | 372 | ||
373 | /* probe only iTPMS */ | 373 | /* probe only iTPMS */ |
@@ -510,7 +510,7 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, | |||
510 | resource_size_t len, unsigned int irq) | 510 | resource_size_t len, unsigned int irq) |
511 | { | 511 | { |
512 | u32 vendor, intfcaps, intmask; | 512 | u32 vendor, intfcaps, intmask; |
513 | int rc, i, irq_s, irq_e; | 513 | int rc, i, irq_s, irq_e, probe; |
514 | struct tpm_chip *chip; | 514 | struct tpm_chip *chip; |
515 | 515 | ||
516 | if (!(chip = tpm_register_hardware(dev, &tpm_tis))) | 516 | if (!(chip = tpm_register_hardware(dev, &tpm_tis))) |
@@ -540,11 +540,12 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, | |||
540 | vendor >> 16, ioread8(chip->vendor.iobase + TPM_RID(0))); | 540 | vendor >> 16, ioread8(chip->vendor.iobase + TPM_RID(0))); |
541 | 541 | ||
542 | if (!itpm) { | 542 | if (!itpm) { |
543 | itpm = probe_itpm(chip); | 543 | probe = probe_itpm(chip); |
544 | if (itpm < 0) { | 544 | if (probe < 0) { |
545 | rc = -ENODEV; | 545 | rc = -ENODEV; |
546 | goto out_err; | 546 | goto out_err; |
547 | } | 547 | } |
548 | itpm = (probe == 0) ? 0 : 1; | ||
548 | } | 549 | } |
549 | 550 | ||
550 | if (itpm) | 551 | if (itpm) |