Skip to content

Commit

Permalink
platform/x86: surface3_power: Simplify mshw0011_adp_psr() to one liner
Browse files Browse the repository at this point in the history
Refactor mshw0011_adp_psr() to be one liner.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  • Loading branch information
Andy Shevchenko committed Mar 28, 2020
1 parent 74bef18 commit 4897899
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/platform/x86/surface3_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,7 @@ static int mshw0011_bst(struct mshw0011_data *cdata, struct bst *bst)

static int mshw0011_adp_psr(struct mshw0011_data *cdata)
{
struct i2c_client *client = cdata->adp1;
int ret;

ret = i2c_smbus_read_byte_data(client, MSHW0011_ADP1_REG_PSR);
if (ret < 0)
return ret;

return ret;
return i2c_smbus_read_byte_data(cdata->adp1, MSHW0011_ADP1_REG_PSR);
}

static int mshw0011_isr(struct mshw0011_data *cdata)
Expand Down

0 comments on commit 4897899

Please sign in to comment.