Re: [PATCH v8 06/10] tpm: Replace device number bitmap with IDR

2016-03-14 Thread Jarkko Sakkinen
On Sun, Mar 13, 2016 at 06:54:36PM -0400, Stefan Berger wrote: > Replace the device number bitmap with IDR. Extend the number of devices we > can create to 64k. > Since an IDR allows us to associate a pointer with an ID, we use this now > to rewrite tpm_chip_find_get() to simply look up the chip po

[PATCH v8 06/10] tpm: Replace device number bitmap with IDR

2016-03-13 Thread Stefan Berger
Replace the device number bitmap with IDR. Extend the number of devices we can create to 64k. Since an IDR allows us to associate a pointer with an ID, we use this now to rewrite tpm_chip_find_get() to simply look up the chip pointer by the given device ID. Protect the IDR calls with a mutex. Sig