aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2014-12-12 14:46:37 -0500
committerPeter Huewe <peterhuewe@gmx.de>2015-01-17 08:00:10 -0500
commit313d21eeab9282e01fdcecd40e9ca87e0953627f (patch)
treec33c8a7d1bc2c589a7673e3781c4d3538059c896
parent71ed848fd791bc0b53a1b7a04f29eb9e994c7cbb (diff)
tpm: device class for tpm
Added own device class for TPM. Uses MISC_MAJOR:TPM_MINOR for the first character device in order to retain backwards compatibility. Added tpm_dev_release() back attached to the character device. I've been running this code now for a while on my laptop (Lenovo T430S) TrouSerS works perfectly without modifications. I don't believe it breaks anything significantly. The sysfs attributes that have been placed under the wrong place and are against sysfs-rules.txt should be probably left to stagnate under platform device directory and start defining new sysfs attributes to the char device directory. Guidelines for future TPM sysfs attributes should be probably along the lines of - Single flat set of mandatory sysfs attributes. For example, current PPI interface is way way too rich when you only want to use it to clear and activate the TPM. - Define sysfs attribute if and only if there's no way to get the value from ring-3. No attributes for TPM properties. It's just unnecessary maintenance hurdle that we don't want. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Jasob Gunthorpe <jason.gunthorpe@obsidianresearch.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Tested-by: Scot Doyle <lkml14@scotdoyle.com> Tested-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
-rw-r--r--Documentation/ABI/stable/sysfs-class-tpm22
-rw-r--r--drivers/char/tpm/tpm-chip.c72
-rw-r--r--drivers/char/tpm/tpm-dev.c36
-rw-r--r--drivers/char/tpm/tpm-interface.c29
-rw-r--r--drivers/char/tpm/tpm.h12
-rw-r--r--drivers/char/tpm/tpm_i2c_nuvoton.c2
-rw-r--r--drivers/char/tpm/tpm_tis.c4
7 files changed, 116 insertions, 61 deletions
diff --git a/Documentation/ABI/stable/sysfs-class-tpm b/Documentation/ABI/stable/sysfs-class-tpm
index a60b45e2493b..9f790eebb5d2 100644
--- a/Documentation/ABI/stable/sysfs-class-tpm
+++ b/Documentation/ABI/stable/sysfs-class-tpm
@@ -1,4 +1,4 @@
1What: /sys/class/misc/tpmX/device/ 1What: /sys/class/tpm/tpmX/device/
2Date: April 2005 2Date: April 2005
3KernelVersion: 2.6.12 3KernelVersion: 2.6.12
4Contact: tpmdd-devel@lists.sf.net 4Contact: tpmdd-devel@lists.sf.net
@@ -6,7 +6,7 @@ Description: The device/ directory under a specific TPM instance exposes
6 the properties of that TPM chip 6 the properties of that TPM chip
7 7
8 8
9What: /sys/class/misc/tpmX/device/active 9What: /sys/class/tpm/tpmX/device/active
10Date: April 2006 10Date: April 2006
11KernelVersion: 2.6.17 11KernelVersion: 2.6.17
12Contact: tpmdd-devel@lists.sf.net 12Contact: tpmdd-devel@lists.sf.net
@@ -18,7 +18,7 @@ Description: The "active" property prints a '1' if the TPM chip is accepting
18 section 17 for more information on which commands are 18 section 17 for more information on which commands are
19 available. 19 available.
20 20
21What: /sys/class/misc/tpmX/device/cancel 21What: /sys/class/tpm/tpmX/device/cancel
22Date: June 2005 22Date: June 2005
23KernelVersion: 2.6.13 23KernelVersion: 2.6.13
24Contact: tpmdd-devel@lists.sf.net 24Contact: tpmdd-devel@lists.sf.net
@@ -26,7 +26,7 @@ Description: The "cancel" property allows you to cancel the currently
26 pending TPM command. Writing any value to cancel will call the 26 pending TPM command. Writing any value to cancel will call the
27 TPM vendor specific cancel operation. 27 TPM vendor specific cancel operation.
28 28
29What: /sys/class/misc/tpmX/device/caps 29What: /sys/class/tpm/tpmX/device/caps
30Date: April 2005 30Date: April 2005
31KernelVersion: 2.6.12 31KernelVersion: 2.6.12
32Contact: tpmdd-devel@lists.sf.net 32Contact: tpmdd-devel@lists.sf.net
@@ -43,7 +43,7 @@ Description: The "caps" property contains TPM manufacturer and version info.
43 the chip supports. Firmware version is that of the chip and 43 the chip supports. Firmware version is that of the chip and
44 is manufacturer specific. 44 is manufacturer specific.
45 45
46What: /sys/class/misc/tpmX/device/durations 46What: /sys/class/tpm/tpmX/device/durations
47Date: March 2011 47Date: March 2011
48KernelVersion: 3.1 48KernelVersion: 3.1
49Contact: tpmdd-devel@lists.sf.net 49Contact: tpmdd-devel@lists.sf.net
@@ -66,7 +66,7 @@ Description: The "durations" property shows the 3 vendor-specific values
66 scaled to be displayed in usecs. In this case "[adjusted]" 66 scaled to be displayed in usecs. In this case "[adjusted]"
67 will be displayed in place of "[original]". 67 will be displayed in place of "[original]".
68 68
69What: /sys/class/misc/tpmX/device/enabled 69What: /sys/class/tpm/tpmX/device/enabled
70Date: April 2006 70Date: April 2006
71KernelVersion: 2.6.17 71KernelVersion: 2.6.17
72Contact: tpmdd-devel@lists.sf.net 72Contact: tpmdd-devel@lists.sf.net
@@ -75,7 +75,7 @@ Description: The "enabled" property prints a '1' if the TPM chip is enabled,
75 may be visible but produce a '0' after some operation that 75 may be visible but produce a '0' after some operation that
76 disables the TPM. 76 disables the TPM.
77 77
78What: /sys/class/misc/tpmX/device/owned 78What: /sys/class/tpm/tpmX/device/owned
79Date: April 2006 79Date: April 2006
80KernelVersion: 2.6.17 80KernelVersion: 2.6.17
81Contact: tpmdd-devel@lists.sf.net 81Contact: tpmdd-devel@lists.sf.net
@@ -83,7 +83,7 @@ Description: The "owned" property produces a '1' if the TPM_TakeOwnership
83 ordinal has been executed successfully in the chip. A '0' 83 ordinal has been executed successfully in the chip. A '0'
84 indicates that ownership hasn't been taken. 84 indicates that ownership hasn't been taken.
85 85
86What: /sys/class/misc/tpmX/device/pcrs 86What: /sys/class/tpm/tpmX/device/pcrs
87Date: April 2005 87Date: April 2005
88KernelVersion: 2.6.12 88KernelVersion: 2.6.12
89Contact: tpmdd-devel@lists.sf.net 89Contact: tpmdd-devel@lists.sf.net
@@ -106,7 +106,7 @@ Description: The "pcrs" property will dump the current value of all Platform
106 1.2 chips, PCRs represent SHA-1 hashes, which are 20 bytes 106 1.2 chips, PCRs represent SHA-1 hashes, which are 20 bytes
107 long. Use the "caps" property to determine TPM version. 107 long. Use the "caps" property to determine TPM version.
108 108
109What: /sys/class/misc/tpmX/device/pubek 109What: /sys/class/tpm/tpmX/device/pubek
110Date: April 2005 110Date: April 2005
111KernelVersion: 2.6.12 111KernelVersion: 2.6.12
112Contact: tpmdd-devel@lists.sf.net 112Contact: tpmdd-devel@lists.sf.net
@@ -158,7 +158,7 @@ Description: The "pubek" property will return the TPM's public endorsement
158 Modulus Length: 256 (bytes) 158 Modulus Length: 256 (bytes)
159 Modulus: The 256 byte Endorsement Key modulus 159 Modulus: The 256 byte Endorsement Key modulus
160 160
161What: /sys/class/misc/tpmX/device/temp_deactivated 161What: /sys/class/tpm/tpmX/device/temp_deactivated
162Date: April 2006 162Date: April 2006
163KernelVersion: 2.6.17 163KernelVersion: 2.6.17
164Contact: tpmdd-devel@lists.sf.net 164Contact: tpmdd-devel@lists.sf.net
@@ -167,7 +167,7 @@ Description: The "temp_deactivated" property returns a '1' if the chip has
167 cycle. Whether a warm boot (reboot) will clear a TPM chip 167 cycle. Whether a warm boot (reboot) will clear a TPM chip
168 from a temp_deactivated state is platform specific. 168 from a temp_deactivated state is platform specific.
169 169
170What: /sys/class/misc/tpmX/device/timeouts 170What: /sys/class/tpm/tpmX/device/timeouts
171Date: March 2011 171Date: March 2011
172KernelVersion: 3.1 172KernelVersion: 3.1
173Contact: tpmdd-devel@lists.sf.net 173Contact: tpmdd-devel@lists.sf.net
diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
index e72b042aa867..7596eef3bff9 100644
--- a/drivers/char/tpm/tpm-chip.c
+++ b/drivers/char/tpm/tpm-chip.c
@@ -25,6 +25,7 @@
25#include <linux/mutex.h> 25#include <linux/mutex.h>
26#include <linux/spinlock.h> 26#include <linux/spinlock.h>
27#include <linux/freezer.h> 27#include <linux/freezer.h>
28#include <linux/major.h>
28#include "tpm.h" 29#include "tpm.h"
29#include "tpm_eventlog.h" 30#include "tpm_eventlog.h"
30 31
@@ -32,6 +33,9 @@ static DECLARE_BITMAP(dev_mask, TPM_NUM_DEVICES);
32static LIST_HEAD(tpm_chip_list); 33static LIST_HEAD(tpm_chip_list);
33static DEFINE_SPINLOCK(driver_lock); 34static DEFINE_SPINLOCK(driver_lock);
34 35
36struct class *tpm_class;
37dev_t tpm_devt;
38
35/* 39/*
36 * tpm_chip_find_get - return tpm_chip for a given chip number 40 * tpm_chip_find_get - return tpm_chip for a given chip number
37 * @chip_num the device number for the chip 41 * @chip_num the device number for the chip
@@ -55,16 +59,14 @@ struct tpm_chip *tpm_chip_find_get(int chip_num)
55} 59}
56 60
57/** 61/**
58 * tpmm_chip_remove() - free chip memory and device number 62 * tpm_dev_release() - free chip memory and the device number
59 * @data: points to struct tpm_chip instance 63 * @dev: the character device for the TPM chip
60 * 64 *
61 * This is used internally by tpmm_chip_alloc() and called by devres 65 * This is used as the release function for the character device.
62 * when the device is released. This function does the opposite of
63 * tpmm_chip_alloc() freeing memory and the device number.
64 */ 66 */
65static void tpmm_chip_remove(void *data) 67static void tpm_dev_release(struct device *dev)
66{ 68{
67 struct tpm_chip *chip = (struct tpm_chip *) data; 69 struct tpm_chip *chip = container_of(dev, struct tpm_chip, dev);
68 70
69 spin_lock(&driver_lock); 71 spin_lock(&driver_lock);
70 clear_bit(chip->dev_num, dev_mask); 72 clear_bit(chip->dev_num, dev_mask);
@@ -111,18 +113,68 @@ struct tpm_chip *tpmm_chip_alloc(struct device *dev,
111 scnprintf(chip->devname, sizeof(chip->devname), "tpm%d", chip->dev_num); 113 scnprintf(chip->devname, sizeof(chip->devname), "tpm%d", chip->dev_num);
112 114
113 chip->pdev = dev; 115 chip->pdev = dev;
114 devm_add_action(dev, tpmm_chip_remove, chip); 116
115 dev_set_drvdata(dev, chip); 117 dev_set_drvdata(dev, chip);
116 118
119 chip->dev.class = tpm_class;
120 chip->dev.release = tpm_dev_release;
121 chip->dev.parent = chip->pdev;
122
123 if (chip->dev_num == 0)
124 chip->dev.devt = MKDEV(MISC_MAJOR, TPM_MINOR);
125 else
126 chip->dev.devt = MKDEV(MAJOR(tpm_devt), chip->dev_num);
127
128 dev_set_name(&chip->dev, chip->devname);
129
130 device_initialize(&chip->dev);
131
132 chip->cdev.owner = chip->pdev->driver->owner;
133 cdev_init(&chip->cdev, &tpm_fops);
134
117 return chip; 135 return chip;
118} 136}
119EXPORT_SYMBOL_GPL(tpmm_chip_alloc); 137EXPORT_SYMBOL_GPL(tpmm_chip_alloc);
120 138
139static int tpm_dev_add_device(struct tpm_chip *chip)
140{
141 int rc;
142
143 rc = device_add(&chip->dev);
144 if (rc) {
145 dev_err(&chip->dev,
146 "unable to device_register() %s, major %d, minor %d, err=%d\n",
147 chip->devname, MAJOR(chip->dev.devt),
148 MINOR(chip->dev.devt), rc);
149
150 return rc;
151 }
152
153 rc = cdev_add(&chip->cdev, chip->dev.devt, 1);
154 if (rc) {
155 dev_err(&chip->dev,
156 "unable to cdev_add() %s, major %d, minor %d, err=%d\n",
157 chip->devname, MAJOR(chip->dev.devt),
158 MINOR(chip->dev.devt), rc);
159
160 device_unregister(&chip->dev);
161 return rc;
162 }
163
164 return rc;
165}
166
167static void tpm_dev_del_device(struct tpm_chip *chip)
168{
169 cdev_del(&chip->cdev);
170 device_unregister(&chip->dev);
171}
172
121/* 173/*
122 * tpm_chip_register() - create a misc driver for the TPM chip 174 * tpm_chip_register() - create a character device for the TPM chip
123 * @chip: TPM chip to use. 175 * @chip: TPM chip to use.
124 * 176 *
125 * Creates a misc driver for the TPM chip and adds sysfs interfaces for 177 * Creates a character device for the TPM chip and adds sysfs interfaces for
126 * the device, PPI and TCPA. As the last step this function adds the 178 * the device, PPI and TCPA. As the last step this function adds the
127 * chip to the list of TPM chips available for use. 179 * chip to the list of TPM chips available for use.
128 * 180 *
diff --git a/drivers/char/tpm/tpm-dev.c b/drivers/char/tpm/tpm-dev.c
index 356832146788..de0337ebd658 100644
--- a/drivers/char/tpm/tpm-dev.c
+++ b/drivers/char/tpm/tpm-dev.c
@@ -17,7 +17,6 @@
17 * License. 17 * License.
18 * 18 *
19 */ 19 */
20#include <linux/miscdevice.h>
21#include <linux/slab.h> 20#include <linux/slab.h>
22#include <linux/uaccess.h> 21#include <linux/uaccess.h>
23#include "tpm.h" 22#include "tpm.h"
@@ -54,9 +53,8 @@ static void timeout_work(struct work_struct *work)
54 53
55static int tpm_open(struct inode *inode, struct file *file) 54static int tpm_open(struct inode *inode, struct file *file)
56{ 55{
57 struct miscdevice *misc = file->private_data; 56 struct tpm_chip *chip =
58 struct tpm_chip *chip = container_of(misc, struct tpm_chip, 57 container_of(inode->i_cdev, struct tpm_chip, cdev);
59 vendor.miscdev);
60 struct file_priv *priv; 58 struct file_priv *priv;
61 59
62 /* It's assured that the chip will be opened just once, 60 /* It's assured that the chip will be opened just once,
@@ -173,7 +171,7 @@ static int tpm_release(struct inode *inode, struct file *file)
173 return 0; 171 return 0;
174} 172}
175 173
176static const struct file_operations tpm_fops = { 174const struct file_operations tpm_fops = {
177 .owner = THIS_MODULE, 175 .owner = THIS_MODULE,
178 .llseek = no_llseek, 176 .llseek = no_llseek,
179 .open = tpm_open, 177 .open = tpm_open,
@@ -182,32 +180,4 @@ static const struct file_operations tpm_fops = {
182 .release = tpm_release, 180 .release = tpm_release,
183}; 181};
184 182
185int tpm_dev_add_device(struct tpm_chip *chip)
186{
187 int rc;
188 183
189 chip->vendor.miscdev.fops = &tpm_fops;
190 if (chip->dev_num == 0)
191 chip->vendor.miscdev.minor = TPM_MINOR;
192 else
193 chip->vendor.miscdev.minor = MISC_DYNAMIC_MINOR;
194
195 chip->vendor.miscdev.name = chip->devname;
196 chip->vendor.miscdev.parent = chip->pdev;
197
198 rc = misc_register(&chip->vendor.miscdev);
199 if (rc) {
200 chip->vendor.miscdev.name = NULL;
201 dev_err(chip->pdev,
202 "unable to misc_register %s, minor %d err=%d\n",
203 chip->vendor.miscdev.name,
204 chip->vendor.miscdev.minor, rc);
205 }
206 return rc;
207}
208
209void tpm_dev_del_device(struct tpm_chip *chip)
210{
211 if (chip->vendor.miscdev.name)
212 misc_deregister(&chip->vendor.miscdev);
213}
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index e2af28fd63cb..b6f6b17392fd 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -997,6 +997,35 @@ int tpm_get_random(u32 chip_num, u8 *out, size_t max)
997} 997}
998EXPORT_SYMBOL_GPL(tpm_get_random); 998EXPORT_SYMBOL_GPL(tpm_get_random);
999 999
1000static int __init tpm_init(void)
1001{
1002 int rc;
1003
1004 tpm_class = class_create(THIS_MODULE, "tpm");
1005 if (IS_ERR(tpm_class)) {
1006 pr_err("couldn't create tpm class\n");
1007 return PTR_ERR(tpm_class);
1008 }
1009
1010 rc = alloc_chrdev_region(&tpm_devt, 0, TPM_NUM_DEVICES, "tpm");
1011 if (rc < 0) {
1012 pr_err("tpm: failed to allocate char dev region\n");
1013 class_destroy(tpm_class);
1014 return rc;
1015 }
1016
1017 return 0;
1018}
1019
1020static void __exit tpm_exit(void)
1021{
1022 class_destroy(tpm_class);
1023 unregister_chrdev_region(tpm_devt, TPM_NUM_DEVICES);
1024}
1025
1026subsys_initcall(tpm_init);
1027module_exit(tpm_exit);
1028
1000MODULE_AUTHOR("Leendert van Doorn (leendert@watson.ibm.com)"); 1029MODULE_AUTHOR("Leendert van Doorn (leendert@watson.ibm.com)");
1001MODULE_DESCRIPTION("TPM Driver"); 1030MODULE_DESCRIPTION("TPM Driver");
1002MODULE_VERSION("2.0"); 1031MODULE_VERSION("2.0");
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index adf6af835329..d46765b4c97e 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -23,11 +23,11 @@
23#include <linux/fs.h> 23#include <linux/fs.h>
24#include <linux/mutex.h> 24#include <linux/mutex.h>
25#include <linux/sched.h> 25#include <linux/sched.h>
26#include <linux/miscdevice.h>
27#include <linux/platform_device.h> 26#include <linux/platform_device.h>
28#include <linux/io.h> 27#include <linux/io.h>
29#include <linux/tpm.h> 28#include <linux/tpm.h>
30#include <linux/acpi.h> 29#include <linux/acpi.h>
30#include <linux/cdev.h>
31 31
32enum tpm_const { 32enum tpm_const {
33 TPM_MINOR = 224, /* officially assigned */ 33 TPM_MINOR = 224, /* officially assigned */
@@ -74,7 +74,6 @@ struct tpm_vendor_specific {
74 int region_size; 74 int region_size;
75 int have_region; 75 int have_region;
76 76
77 struct miscdevice miscdev;
78 struct list_head list; 77 struct list_head list;
79 int locality; 78 int locality;
80 unsigned long timeout_a, timeout_b, timeout_c, timeout_d; /* jiffies */ 79 unsigned long timeout_a, timeout_b, timeout_c, timeout_d; /* jiffies */
@@ -104,6 +103,9 @@ enum tpm_chip_flags {
104 103
105struct tpm_chip { 104struct tpm_chip {
106 struct device *pdev; /* Device stuff */ 105 struct device *pdev; /* Device stuff */
106 struct device dev;
107 struct cdev cdev;
108
107 const struct tpm_class_ops *ops; 109 const struct tpm_class_ops *ops;
108 unsigned int flags; 110 unsigned int flags;
109 111
@@ -326,6 +328,10 @@ struct tpm_cmd_t {
326 tpm_cmd_params params; 328 tpm_cmd_params params;
327} __packed; 329} __packed;
328 330
331extern struct class *tpm_class;
332extern dev_t tpm_devt;
333extern const struct file_operations tpm_fops;
334
329ssize_t tpm_getcap(struct device *, __be32, cap_t *, const char *); 335ssize_t tpm_getcap(struct device *, __be32, cap_t *, const char *);
330ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf, 336ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf,
331 size_t bufsiz); 337 size_t bufsiz);
@@ -346,8 +352,6 @@ extern struct tpm_chip *tpmm_chip_alloc(struct device *dev,
346extern int tpm_chip_register(struct tpm_chip *chip); 352extern int tpm_chip_register(struct tpm_chip *chip);
347extern void tpm_chip_unregister(struct tpm_chip *chip); 353extern void tpm_chip_unregister(struct tpm_chip *chip);
348 354
349int tpm_dev_add_device(struct tpm_chip *chip);
350void tpm_dev_del_device(struct tpm_chip *chip);
351int tpm_sysfs_add_device(struct tpm_chip *chip); 355int tpm_sysfs_add_device(struct tpm_chip *chip);
352void tpm_sysfs_del_device(struct tpm_chip *chip); 356void tpm_sysfs_del_device(struct tpm_chip *chip);
353 357
diff --git a/drivers/char/tpm/tpm_i2c_nuvoton.c b/drivers/char/tpm/tpm_i2c_nuvoton.c
index e1eadb0c1568..9d42b7d78e50 100644
--- a/drivers/char/tpm/tpm_i2c_nuvoton.c
+++ b/drivers/char/tpm/tpm_i2c_nuvoton.c
@@ -560,7 +560,7 @@ static int i2c_nuvoton_probe(struct i2c_client *client,
560 rc = devm_request_irq(dev, chip->vendor.irq, 560 rc = devm_request_irq(dev, chip->vendor.irq,
561 i2c_nuvoton_int_handler, 561 i2c_nuvoton_int_handler,
562 IRQF_TRIGGER_LOW, 562 IRQF_TRIGGER_LOW,
563 chip->vendor.miscdev.name, 563 chip->devname,
564 chip); 564 chip);
565 if (rc) { 565 if (rc) {
566 dev_err(dev, "%s() Unable to request irq: %d for use\n", 566 dev_err(dev, "%s() Unable to request irq: %d for use\n",
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 9e02489a94f3..239cf0bbc1a1 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -698,7 +698,7 @@ static int tpm_tis_init(struct device *dev, acpi_handle acpi_dev_handle,
698 TPM_INT_VECTOR(chip->vendor.locality)); 698 TPM_INT_VECTOR(chip->vendor.locality));
699 if (devm_request_irq 699 if (devm_request_irq
700 (dev, i, tis_int_probe, IRQF_SHARED, 700 (dev, i, tis_int_probe, IRQF_SHARED,
701 chip->vendor.miscdev.name, chip) != 0) { 701 chip->devname, chip) != 0) {
702 dev_info(chip->pdev, 702 dev_info(chip->pdev,
703 "Unable to request irq: %d for probe\n", 703 "Unable to request irq: %d for probe\n",
704 i); 704 i);
@@ -745,7 +745,7 @@ static int tpm_tis_init(struct device *dev, acpi_handle acpi_dev_handle,
745 TPM_INT_VECTOR(chip->vendor.locality)); 745 TPM_INT_VECTOR(chip->vendor.locality));
746 if (devm_request_irq 746 if (devm_request_irq
747 (dev, chip->vendor.irq, tis_int_handler, IRQF_SHARED, 747 (dev, chip->vendor.irq, tis_int_handler, IRQF_SHARED,
748 chip->vendor.miscdev.name, chip) != 0) { 748 chip->devname, chip) != 0) {
749 dev_info(chip->pdev, 749 dev_info(chip->pdev,
750 "Unable to request irq: %d for use\n", 750 "Unable to request irq: %d for use\n",
751 chip->vendor.irq); 751 chip->vendor.irq);