Commit 6434eade authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'tpmdd-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd

Pull tpm updates from Jarkko Sakkinen:
 "Just a couple fixes and no new features"

* tag 'tpmdd-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
  tpm: cr50: fix kernel-doc warning and spelling
  tpm: nuvoton: Use i2c_get_match_data()
parents 120a201b 2b6fad7a
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/of_device.h> #include <linux/of.h>
#include <linux/property.h>
#include "tpm.h" #include "tpm.h"
/* I2C interface offsets */ /* I2C interface offsets */
...@@ -524,7 +525,6 @@ static int get_vid(struct i2c_client *client, u32 *res) ...@@ -524,7 +525,6 @@ static int get_vid(struct i2c_client *client, u32 *res)
static int i2c_nuvoton_probe(struct i2c_client *client) static int i2c_nuvoton_probe(struct i2c_client *client)
{ {
const struct i2c_device_id *id = i2c_client_get_device_id(client);
int rc; int rc;
struct tpm_chip *chip; struct tpm_chip *chip;
struct device *dev = &client->dev; struct device *dev = &client->dev;
...@@ -546,14 +546,7 @@ static int i2c_nuvoton_probe(struct i2c_client *client) ...@@ -546,14 +546,7 @@ static int i2c_nuvoton_probe(struct i2c_client *client)
if (!priv) if (!priv)
return -ENOMEM; return -ENOMEM;
if (dev->of_node) { if (i2c_get_match_data(client))
const struct of_device_id *of_id;
of_id = of_match_device(dev->driver->of_match_table, dev);
if (of_id && of_id->data == OF_IS_TPM2)
chip->flags |= TPM_CHIP_FLAG_TPM2;
} else
if (id->driver_data == I2C_IS_TPM2)
chip->flags |= TPM_CHIP_FLAG_TPM2; chip->flags |= TPM_CHIP_FLAG_TPM2;
init_waitqueue_head(&priv->read_queue); init_waitqueue_head(&priv->read_queue);
......
...@@ -235,7 +235,7 @@ static int tpm_cr50_i2c_read(struct tpm_chip *chip, u8 addr, u8 *buffer, size_t ...@@ -235,7 +235,7 @@ static int tpm_cr50_i2c_read(struct tpm_chip *chip, u8 addr, u8 *buffer, size_t
* @len: Number of bytes to write. * @len: Number of bytes to write.
* *
* The provided address is prepended to the data in 'buffer', the * The provided address is prepended to the data in 'buffer', the
* cobined address+data is sent to the TPM, then wait for TPM to * combined address+data is sent to the TPM, then wait for TPM to
* indicate it is done writing. * indicate it is done writing.
* *
* Return: * Return:
...@@ -671,7 +671,6 @@ MODULE_DEVICE_TABLE(of, of_cr50_i2c_match); ...@@ -671,7 +671,6 @@ MODULE_DEVICE_TABLE(of, of_cr50_i2c_match);
/** /**
* tpm_cr50_i2c_probe() - Driver probe function. * tpm_cr50_i2c_probe() - Driver probe function.
* @client: I2C client information. * @client: I2C client information.
* @id: I2C device id.
* *
* Return: * Return:
* - 0: Success. * - 0: Success.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment