Skip to content

Commit

Permalink
tpm/tpm_crb: drop useless cpu_to_le32 when writing to registers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomas Winkler authored and Jarkko Sakkinen committed Sep 15, 2016
1 parent aa77ea0 commit 47de683
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/char/tpm/tpm_crb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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");
Expand Down

0 comments on commit 47de683

Please sign in to comment.