]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
tpm/tpm_crb: drop useless cpu_to_le32 when writing to registers
authorTomas Winkler <tomas.winkler@intel.com>
Mon, 12 Sep 2016 11:27:09 +0000 (14:27 +0300)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Thu, 15 Sep 2016 13:04:21 +0000 (16:04 +0300)
Don't apply endianity conversion when writing to the registers
this is already handled by the system.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm_crb.c

index 18b5b83af36d61f7b15bb947b1193516bf8e269c..ceea7e256a6dfa1a60d67f4bd3f683f0f9fcc48c 100644 (file)
@@ -159,7 +159,7 @@ static int crb_send(struct tpm_chip *chip, u8 *buf, size_t len)
        wmb();
 
        if (priv->flags & CRB_FL_CRB_START)
-               iowrite32(cpu_to_le32(CRB_START_INVOKE), &priv->cca->start);
+               iowrite32(CRB_START_INVOKE, &priv->cca->start);
 
        if (priv->flags & CRB_FL_ACPI_START)
                rc = crb_do_acpi_start(chip);
@@ -171,7 +171,7 @@ static void crb_cancel(struct tpm_chip *chip)
 {
        struct crb_priv *priv = dev_get_drvdata(&chip->dev);
 
-       iowrite32(cpu_to_le32(CRB_CANCEL_INVOKE), &priv->cca->cancel);
+       iowrite32(CRB_CANCEL_INVOKE, &priv->cca->cancel);
 
        if ((priv->flags & CRB_FL_ACPI_START) && crb_do_acpi_start(chip))
                dev_err(&chip->dev, "ACPI Start failed\n");