Skip to content
Commit 58c09e21 authored by Jason Gunthorpe's avatar Jason Gunthorpe Committed by Peter Huewe
Browse files

tpm: Use container_of to locate the tpm_chip in tpm_open



misc_open sets the file->private_date to the misc_dev when calling
open. We can use container_of to go from the misc_dev back to the
tpm_chip.

Future clean ups will move tpm_open into a new file and this change
means we do not have to export the tpm_chip list.

Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: default avatarJoel Schopp <jschopp@linux.vnet.ibm.com>
Reviewed-by: default avatarPeter Huewe <peterhuewe@gmx.de>
Acked-by: default avatarAshley Lai <adlai@linux.vnet.ibm.com>
Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
parent 6aff1fdc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment