Commit 36056290 authored by Wolfram Sang's avatar Wolfram Sang Committed by Wolfram Sang

i2c: taos-evm: convert to use i2c_new_client_device()

Move away from the deprecated API and return the shiny new ERRPTR where
useful.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
Tested-by: default avatarJean Delvare <jdelvare@suse.de>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent f12c5290
...@@ -49,10 +49,10 @@ static struct i2c_client *taos_instantiate_device(struct i2c_adapter *adapter) ...@@ -49,10 +49,10 @@ static struct i2c_client *taos_instantiate_device(struct i2c_adapter *adapter)
if (!strncmp(adapter->name, "TAOS TSL2550 EVM", 16)) { if (!strncmp(adapter->name, "TAOS TSL2550 EVM", 16)) {
dev_info(&adapter->dev, "Instantiating device %s at 0x%02x\n", dev_info(&adapter->dev, "Instantiating device %s at 0x%02x\n",
tsl2550_info.type, tsl2550_info.addr); tsl2550_info.type, tsl2550_info.addr);
return i2c_new_device(adapter, &tsl2550_info); return i2c_new_client_device(adapter, &tsl2550_info);
} }
return NULL; return ERR_PTR(-ENODEV);
} }
static int taos_smbus_xfer(struct i2c_adapter *adapter, u16 addr, static int taos_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
......
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