On Tue, Aug 16, 2016 at 02:21:53PM +0530, Nayna wrote:

> I tried the suggested approach and since ACPI specific functions won't be
> available for arch using CONFIG_OF, so the compilation fails and vice versa
> for CONFIG_ACPI..

Right, you need to stub out the read_X function with an empty inline
when not available.

> Jason, for understanding.. can you explain the issue with existing design
> for read_log, where arch specific read_log is compiled based on CONFIG
> option.. And then, we can just change in Makefile.. where currently it is
> like
> 
> ifdef CONFIG_ACPI
>        tpm-y += tpm_acpi.o
> else
> ifdef CONFIG_OF
>        tpm-y += tpm_of.o
> endif
> endif

The 'else' is the main issue

 
> this can be changed to
> tpm-$(CONFIG_ACPI) += tpm_acpi.o
> tpm-$(CONFIG_OF) += tpm_of.o

This is fine by me, *however* only if the .o files do not define
overlapping symbols as they do today (eg tpm_acpi contains read_log_acpi)

Use some small #ifdef logic in the header file to create the inline
stub.

Jason

------------------------------------------------------------------------------
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

Reply via email to