> On Thu, Dec 14, 2017 at 05:06:12PM +0100, Alexander Steffen wrote: > > According to the comments, adding/removing the chip from the list should > be > > the first/last action in (un)register. But currently it is done in a > > subfunction in the middle of the process. Moving the code from the > > subfunctions to the appropriate places within (un)register ensures that the > > code matches the comments. > > The code is in the proper place. > > The visibility of the IDR and the cdev are linked together, they > should be in the same place, side by side. Could you explain why that is? My understanding is that the cdev is for the user space to talk to the TPM, the IDR is for the kernel to talk to the TPM. They share the underlying device, but should otherwise be completely independent. You could (in theory) have the user space interface without the kernel interface or vice versa. What am I missing? > It doesn't make sense to dis-associate them in the code... If you have > a problem with comments they should be revised instead. > > Jason