提交 48978995 编写于 作者: A Andy Shevchenko

platform/x86: surface3_power: Simplify mshw0011_adp_psr() to one liner

Refactor mshw0011_adp_psr() to be one liner.
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
上级 74bef188
...@@ -295,14 +295,7 @@ static int mshw0011_bst(struct mshw0011_data *cdata, struct bst *bst) ...@@ -295,14 +295,7 @@ static int mshw0011_bst(struct mshw0011_data *cdata, struct bst *bst)
static int mshw0011_adp_psr(struct mshw0011_data *cdata) static int mshw0011_adp_psr(struct mshw0011_data *cdata)
{ {
struct i2c_client *client = cdata->adp1; return i2c_smbus_read_byte_data(cdata->adp1, MSHW0011_ADP1_REG_PSR);
int ret;
ret = i2c_smbus_read_byte_data(client, MSHW0011_ADP1_REG_PSR);
if (ret < 0)
return ret;
return ret;
} }
static int mshw0011_isr(struct mshw0011_data *cdata) static int mshw0011_isr(struct mshw0011_data *cdata)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册