projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99c4940
)
tpm: use idr_find(), not idr_find_slowpath()
author
Matthew Wilcox
<
[email protected]
>
Wed, 14 Dec 2016 23:09:16 +0000
(15:09 -0800)
committer
Linus Torvalds
<
[email protected]
>
Thu, 15 Dec 2016 00:04:10 +0000
(16:04 -0800)
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]
>
drivers/char/tpm/tpm-chip.c
patch
|
blob
|
history
diff --git
a/drivers/char/tpm/tpm-chip.c
b/drivers/char/tpm/tpm-chip.c
index e5950131bd907dbee3f4b4c3598c05572fcea416..447b6ca098261874a5d3ea0f66bccac91374bad4 100644
(file)
--- 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;
}