lkml.org 
[lkml]   [2013]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/13] tpm: Pull everything related to /dev/tpmX into tpm-dev.c
On Wed, Oct 02, 2013 at 12:52:40AM +0200, Peter H?we wrote:
> Am Montag, 23. September 2013, 20:14:38 schrieb Jason Gunthorpe:
> > CLASS-dev.c is a common idiom for Linux subsystems
> >
> > This pulls all the code related to the miscdev into tpm-dev.c and makes it
> > static. The identical file_operation structs in the drivers are purged and
> > the tpm common code unconditionally creates the miscdev.
> >
> > Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> > drivers/char/tpm/Makefile | 2 +-
> > drivers/char/tpm/tpm-dev.c | 199
>
> When compiling the tpm drivers as modules I get
> ERROR: "tpm_sysfs_del_device" [drivers/char/tpm/tpm.ko] undefined!
> ERROR: "tpm_dev_add_device" [drivers/char/tpm/tpm.ko] undefined!
> ERROR: "tpm_dev_del_device" [drivers/char/tpm/tpm.ko] undefined!
> ERROR: "tpm_sysfs_add_device" [drivers/char/tpm/tpm.ko] undefined!
> ERROR: "tpm_transmit" [drivers/char/tpm/tpm-sysfs.ko] undefined!
> ERROR: "tpm_pcr_read_dev" [drivers/char/tpm/tpm-sysfs.ko] undefined!
> ERROR: "tpm_getcap" [drivers/char/tpm/tpm-sysfs.ko] undefined!
> ERROR: "tpm_transmit" [drivers/char/tpm/tpm-dev.ko] undefined!

Oh, I am glad you can test modules..

I botched the makefile changes for the new .c files.

I believe it should be like this:

obj-$(CONFIG_TCG_TPM) += tpm-core.o
tpm-core-y := tpm.o tpm-dev.o tpm-sysfs.o

> I added a suitable patch with the appropriate EXPORT_SYMBOL_GPL declarations
> to my testing branch. (also see next message)

EXPORT_SYMBOL_GPL is not correct, these are in-module references, not
cross module references, and I've deliberately not exported them to
prevent drivers from trying to use them inappropriately.

Let me know if you want me to respin things.

Regards,
Jason


\
 
 \ /
  Last update: 2013-10-02 01:21    [W:0.092 / U:10.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site