Re: [PATCH] - TPM device driver layer (tpm.c|h) - repost

From: Richard MUSIL
Date: Tue Sep 25 2007 - 09:15:29 EST


Hello all,

sometime ago I submitted patch to TPM layer, originally I thought this
patch could be accepted into kernel (see below). However,
since this did not happen, I wonder, if there are some problems with the
patch or whether I am expected to do/provide something else, in order to
have it accepted.

The patch follows even more below.

Thanks,
Richard

Greg KH wrote:
> On Thu, Aug 23, 2007 at 10:46:55AM +0200, Richard MUSIL wrote:
>> Dear all,
>>
>> I am currently writing virtual TPM device driver. This driver exposes
>> itself and behaves like regular TPM device (i.e. uses TPM layer which is
>> already present in kernel), but instead of talking to hardware it talks
>> to user space.
>
> Heh, I like the idea, I can imagine what it could be used for :)
>
>> What I present below is rather quickfix with least impact on other TPM
>> parts (drivers). The patch uses device->remove callback (of
>> platform_device device) and reroutes this to itself. In this
>> callback it eventually calls vendor callback and finally kfrees all
>> memory resources allocated on its own.
>
> It looks sane to me, nice fixup.
>
> thanks,
>
> greg k-h
>