Commit 9410b7d7 authored by Wolfram Sang's avatar Wolfram Sang

power: supply: sbs-battery: remove superfluous variable init

Those variables are immediately assigned a value afterwards.
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 1cf85553
...@@ -177,10 +177,8 @@ static bool force_load; ...@@ -177,10 +177,8 @@ static bool force_load;
static int sbs_read_word_data(struct i2c_client *client, u8 address) static int sbs_read_word_data(struct i2c_client *client, u8 address)
{ {
struct sbs_info *chip = i2c_get_clientdata(client); struct sbs_info *chip = i2c_get_clientdata(client);
int retries = chip->i2c_retry_count;
s32 ret = 0; s32 ret = 0;
int retries = 1;
retries = chip->i2c_retry_count;
while (retries > 0) { while (retries > 0) {
ret = i2c_smbus_read_word_data(client, address); ret = i2c_smbus_read_word_data(client, address);
...@@ -204,7 +202,7 @@ static int sbs_read_string_data(struct i2c_client *client, u8 address, ...@@ -204,7 +202,7 @@ static int sbs_read_string_data(struct i2c_client *client, u8 address,
{ {
struct sbs_info *chip = i2c_get_clientdata(client); struct sbs_info *chip = i2c_get_clientdata(client);
s32 ret = 0, block_length = 0; s32 ret = 0, block_length = 0;
int retries_length = 1, retries_block = 1; int retries_length, retries_block;
u8 block_buffer[I2C_SMBUS_BLOCK_MAX + 1]; u8 block_buffer[I2C_SMBUS_BLOCK_MAX + 1];
retries_length = chip->i2c_retry_count; retries_length = chip->i2c_retry_count;
...@@ -269,10 +267,8 @@ static int sbs_write_word_data(struct i2c_client *client, u8 address, ...@@ -269,10 +267,8 @@ static int sbs_write_word_data(struct i2c_client *client, u8 address,
u16 value) u16 value)
{ {
struct sbs_info *chip = i2c_get_clientdata(client); struct sbs_info *chip = i2c_get_clientdata(client);
int retries = chip->i2c_retry_count;
s32 ret = 0; s32 ret = 0;
int retries = 1;
retries = chip->i2c_retry_count;
while (retries > 0) { while (retries > 0) {
ret = i2c_smbus_write_word_data(client, address, value); ret = i2c_smbus_write_word_data(client, address, value);
......
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