summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2014-12-01 19:32:49 +0100
committerPeter Huewe <peterhuewe@gmx.de>2015-01-17 14:00:06 +0100
commit7500c4b99bddf1b01440bb430d7e38e7652817bf (patch)
tree435be9fb9a7c8521d83d18b44e09818ff2a2055b /drivers/char/tpm
parenttpm/tpm_i2c_stm_st33: Change License header to have up to date address inform... (diff)
downloadlinux-7500c4b99bddf1b01440bb430d7e38e7652817bf.tar.xz
linux-7500c4b99bddf1b01440bb430d7e38e7652817bf.zip
tpm/tpm_i2c_stm_st33: Fix few coding style error reported by scripts/checkpatch.pl
Fix: - WARNING: Missing a blank line after declarations - WARNING: braces {} are not necessary for any arm of this statement Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r--drivers/char/tpm/tpm_i2c_stm_st33.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/char/tpm/tpm_i2c_stm_st33.c b/drivers/char/tpm/tpm_i2c_stm_st33.c
index bf1e53093873..c4925a03d7ab 100644
--- a/drivers/char/tpm/tpm_i2c_stm_st33.c
+++ b/drivers/char/tpm/tpm_i2c_stm_st33.c
@@ -156,6 +156,7 @@ static int read8_reg(struct i2c_client *client, u8 tpm_register,
static void clear_interruption(struct i2c_client *client)
{
u8 interrupt;
+
I2C_READ_DATA(client, TPM_INT_STATUS, &interrupt, 1);
I2C_WRITE_DATA(client, TPM_INT_STATUS, &interrupt, 1);
I2C_READ_DATA(client, TPM_INT_STATUS, &interrupt, 1);
@@ -232,6 +233,7 @@ static u8 tpm_stm_i2c_status(struct tpm_chip *chip)
{
struct i2c_client *client;
u8 data;
+
client = (struct i2c_client *)TPM_VPRIV(chip);
I2C_READ_DATA(client, TPM_STS, &data, 1);
@@ -783,11 +785,11 @@ static int tpm_st33_i2c_pm_suspend(struct device *dev)
struct st33zp24_platform_data *pin_infos = dev->platform_data;
int ret = 0;
- if (power_mgt) {
+ if (power_mgt)
gpio_set_value(pin_infos->io_lpcpd, 0);
- } else {
+ else
ret = tpm_pm_suspend(dev);
- }
+
return ret;
} /* tpm_st33_i2c_suspend() */