diff options
| author | Matthew Wilcox <[email protected]> | 2016-12-14 15:09:16 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2016-12-14 16:04:10 -0800 |
| commit | 37f4915fef0572e41ab91b7d3f7feb237cddbd92 (patch) | |
| tree | 44344746b3714b2b9d8ddfa6f5fc9445f7591d2e | |
| parent | 99c494077e2d4282a17120a772eecc00ec3004cc (diff) | |
tpm: use idr_find(), not idr_find_slowpath()
idr_find_slowpath() is not intended to be part of the public API, it's
an implementation detail. There's no reason to skip straight to the
slowpath here.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Matthew Wilcox <[email protected]>
Tested-by: Kirill A. Shutemov <[email protected]>
Cc: Konstantin Khlebnikov <[email protected]>
Cc: Ross Zwisler <[email protected]>
Cc: Peter Huewe <[email protected]>
Cc: Marcel Selhorst <[email protected]>
Cc: Jarkko Sakkinen <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| -rw-r--r-- | drivers/char/tpm/tpm-chip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c index e5950131bd90..447b6ca09826 100644 --- a/drivers/char/tpm/tpm-chip.c +++ b/drivers/char/tpm/tpm-chip.c @@ -84,7 +84,7 @@ EXPORT_SYMBOL_GPL(tpm_put_ops); * * The return'd chip has been tpm_try_get_ops'd and must be released via * tpm_put_ops - */ + */ struct tpm_chip *tpm_chip_find_get(int chip_num) { struct tpm_chip *chip, *res = NULL; @@ -103,7 +103,7 @@ struct tpm_chip *tpm_chip_find_get(int chip_num) } } while (chip_prev != chip_num); } else { - chip = idr_find_slowpath(&dev_nums_idr, chip_num); + chip = idr_find(&dev_nums_idr, chip_num); if (chip && !tpm_try_get_ops(chip)) res = chip; } |