Message ID | 1473635035-14443-4-git-send-email-tomas.winkler@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Sep 12, 2016 at 02:03:54AM +0300, Tomas Winkler wrote: > 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> /Jarkko > --- > drivers/char/tpm/tpm_crb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c > index f066810bfc03..0c9989d0106e 100644 > --- a/drivers/char/tpm/tpm_crb.c > +++ b/drivers/char/tpm/tpm_crb.c > @@ -154,7 +154,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); > @@ -166,7 +166,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); > > /* Make sure that cmd is populated before issuing cancel. */ > wmb(); > -- > 2.7.4 > ------------------------------------------------------------------------------
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c index f066810bfc03..0c9989d0106e 100644 --- a/drivers/char/tpm/tpm_crb.c +++ b/drivers/char/tpm/tpm_crb.c @@ -154,7 +154,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); @@ -166,7 +166,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); /* Make sure that cmd is populated before issuing cancel. */ wmb();
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> --- drivers/char/tpm/tpm_crb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)