Skip to contentSkip to conversation

tpm: fix tpm exports

PATCH New Kylene Hall 1 participant 1 message May 26, 2005 1 message not in the archive TPM device driver

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 tpm: fix tpm exports

Quoted 12 lines · Andrew Morton

With `make allmodconfig':

*** Warning: "tpm_show_pubek" [drivers/char/tpm/tpm.ko] undefined! *** Warning: "tpm_show_caps" [drivers/char/tpm/tpm.ko] undefined! *** Warning: "tpm_show_pcrs" [drivers/char/tpm/tpm.ko] undefined!

I don't know what you're trying to do here. Please review all exports in -rc5-mm1, fix.

The following patch fixes warnings received when compiling 2.6.12-rc5-mm1.
Description: Fixes tpm device attribute functions with the wrong names and types.

---

drivers/char/tpm/tpm.c +8 -4
@@ -130,7 +131,8 @@ static const u8 pcrread[] = {
 	0, 0, 0, 0		/* PCR index */
 };
 
-ssize_t show_pcrs(struct device *dev, struct device_attribute *attr, char *buf)
+ssize_t tpm_show_pcrs(struct device *dev, struct device_attribute *attr,
+		      char *buf)
 {
 	u8 data[READ_PCR_RESULT_SIZE];
 	ssize_t len;
@@ -182,7 +186,8 @@ static const u8 readpubek[] = {
 	0, 0, 0, 124,		/* TPM_ORD_ReadPubek */
 };
 
-ssize_t show_pubek(struct device *dev, struct device_attribute *attr, char *buf)
+ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr,
+		       char *buf)
 {
 	u8 *data;
 	ssize_t len;
@@ -263,7 +267,8 @@ static const u8 cap_manufacturer[] = {
 	0, 0, 1, 3
 };
 
-ssize_t show_caps(struct device *dev, struct device_attribute *attr, char *buf)
+ssize_t tpm_show_caps(struct device *dev, struct device_attribute *attr,
+		      char *buf)
 {
 	u8 data[sizeof(cap_manufacturer)];
 	ssize_t len;
@@ -299,7 +303,8 @@ ssize_t show_caps(struct device *dev, st
 
 EXPORT_SYMBOL_GPL(tpm_show_caps);
 
-ssize_t tpm_store_cancel(struct device * dev, const char *buf,
+ssize_t tpm_store_cancel(struct device * dev,
+			 struct device_attribute * attr, const char *buf,
 			 size_t count)
 {
 	struct tpm_chip *chip = dev_get_drvdata(dev);
drivers/char/tpm/tpm.h +8 -4
@@ -35,10 +35,14 @@ enum tpm_addr {
 	TPM_DATA = 0x4F
 };
 
-extern ssize_t tpm_show_pubek(struct device *, char *);
-extern ssize_t tpm_show_pcrs(struct device *, char *);
-extern ssize_t tpm_show_caps(struct device *, char *);
-extern ssize_t tpm_store_cancel(struct device *, const char *, size_t);
+extern ssize_t tpm_show_pubek(struct device *, struct device_attribute *,
+			      char *);
+extern ssize_t tpm_show_pcrs(struct device *, struct device_attribute *,
+			     char *);
+extern ssize_t tpm_show_caps(struct device *, struct device_attribute *,
+			     char *);
+extern ssize_t tpm_store_cancel(struct device *, struct device_attribute *,
+				const char *, size_t);
 
 
 struct tpm_chip;