diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-25 03:53:42 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-25 03:53:42 -0300 |
commit | 03dd4cb26d967f9588437b0fc9cc0e8353322bb7 (patch) | |
tree | fa581f6dc1c0596391690d1f67eceef3af8246dc /drivers/mfd/tps65010.c | |
parent | d4e493caf788ef44982e131ff9c786546904d934 (diff) |
Linux-libre 4.5-gnu
Diffstat (limited to 'drivers/mfd/tps65010.c')
-rw-r--r-- | drivers/mfd/tps65010.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c index 448f0a182..83e615ed1 100644 --- a/drivers/mfd/tps65010.c +++ b/drivers/mfd/tps65010.c @@ -499,11 +499,11 @@ static int tps65010_gpio_get(struct gpio_chip *chip, unsigned offset) if (offset < 4) { value = i2c_smbus_read_byte_data(tps->client, TPS_DEFGPIO); if (value < 0) - return 0; + return value; if (value & (1 << (offset + 4))) /* output */ return !(value & (1 << offset)); else /* input */ - return (value & (1 << offset)); + return !!(value & (1 << offset)); } /* REVISIT we *could* report LED1/nPG and LED2 state ... */ @@ -638,7 +638,7 @@ static int tps65010_probe(struct i2c_client *client, tps->outmask = board->outmask; tps->chip.label = client->name; - tps->chip.dev = &client->dev; + tps->chip.parent = &client->dev; tps->chip.owner = THIS_MODULE; tps->chip.set = tps65010_gpio_set; |