From: Randy Dunlap <rdunlap@xenotime•net>
To: Stephen Rothwell <sfr@canb•auug.org.au>,
Leendert van Doorn <leendert@watson•ibm.com>
Cc: linux-next@vger•kernel.org, LKML <linux-kernel@vger•kernel.org>,
James Morris <jmorris@namei•org>,
tpmdd-devel@lists•sourceforge.net
Subject: [PATCH -next] tpm_tis: fix build when ACPI is not enabled
Date: Wed, 27 Jul 2011 11:42:11 -0700 [thread overview]
Message-ID: <20110727114211.18be47cf.rdunlap@xenotime.net> (raw)
In-Reply-To: <20110727141151.d31e3da6a8d21a255473293c@canb.auug.org.au>
From: Randy Dunlap <rdunlap@xenotime•net>
Fix tpm_tis.c build when CONFIG_ACPI is not enabled by providing
a stub function. Fixes many build errors/warnings:
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
drivers/char/tpm/tpm_tis.c:89: error: request for member 'list' in something not a structure or union
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of '__mptr'
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
drivers/char/tpm/tpm_tis.c:89: error: request for member 'list' in something not a structure or union
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
drivers/char/tpm/tpm_tis.c:89: error: request for member 'list' in something not a structure or union
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of '__mptr'
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
drivers/char/tpm/tpm_tis.c:89: error: request for member 'list' in something not a structure or union
drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
drivers/char/tpm/tpm_tis.c:90: error: dereferencing pointer to incomplete type
Signed-off-by: Randy Dunlap <rdunlap@xenotime•net>
Cc: Leendert van Doorn <leendert@watson•ibm.com>
---
drivers/char/tpm/tpm_tis.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- linux-next-20110727.orig/drivers/char/tpm/tpm_tis.c
+++ linux-next-20110727/drivers/char/tpm/tpm_tis.c
@@ -80,7 +80,7 @@ enum tis_defaults {
static LIST_HEAD(tis_chips);
static DEFINE_SPINLOCK(tis_lock);
-#ifdef CONFIG_PNP
+#if defined(CONFIG_PNP) && defined(CONFIG_ACPI)
static int is_itpm(struct pnp_dev *dev)
{
struct acpi_device *acpi = pnp_acpi_device(dev);
@@ -93,6 +93,11 @@ static int is_itpm(struct pnp_dev *dev)
return 0;
}
+#else
+static inline int is_itpm(struct pnp_dev *dev)
+{
+ return 0;
+}
#endif
static int check_locality(struct tpm_chip *chip, int l)
next prev parent reply other threads:[~2011-07-27 18:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-27 4:11 linux-next: Tree for July 27 Stephen Rothwell
2011-07-27 16:27 ` [patch] Re: linux-next: Tree for July 27 (misc/pti) Randy Dunlap
2011-07-27 18:54 ` J Freyensee
2011-07-27 16:41 ` linux-next: Tree for July 27 (watchdog/hpwdt) Randy Dunlap
2011-07-27 19:39 ` Wim Van Sebroeck
2011-07-27 17:11 ` [PATCH -next] firmware: fix google/gsmi.c build warning Randy Dunlap
2011-07-27 19:49 ` Mike Waychison
2011-07-27 18:42 ` Randy Dunlap [this message]
2011-08-03 18:56 ` [PATCH -next] tpm_tis: fix build when ACPI is not enabled Ingo Molnar
2011-08-04 1:34 ` James Morris
[not found] ` <20110727104716.dda819dc.rdunlap@xenotime.net>
2011-07-27 20:11 ` linux-next: Tree for July 27 (iscsi_target) [resend/lost] Nicholas A. Bellinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110727114211.18be47cf.rdunlap@xenotime.net \
--to=rdunlap@xenotime$(echo .)net \
--cc=jmorris@namei$(echo .)org \
--cc=leendert@watson$(echo .)ibm.com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=tpmdd-devel@lists$(echo .)sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox