tpm: Use container_of to locate the tpm_chip in tpm_open
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Sat, 5 Oct 2013 17:38:02 +0000 (11:38 -0600)
committerPeter Huewe <peterhuewe@gmx.de>
Tue, 22 Oct 2013 17:42:31 +0000 (19:42 +0200)
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: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com>
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Ashley Lai <adlai@linux.vnet.ibm.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>

No differences found