Re: [tpmdd-devel] [PATCH 05/13] tpm: Use container_of to locate the tpm_chip in tpm_open

2013-10-04 Thread Ashley Lai
On Mon, 2013-09-23 at 12:14 -0600, Jason Gunthorpe wrote: > 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

Re: [tpmdd-devel] [PATCH 05/13] tpm: Use container_of to locate the tpm_chip in tpm_open

2013-10-04 Thread Ashley Lai
On Mon, 2013-09-23 at 12:14 -0600, Jason Gunthorpe wrote: 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