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

i2c: powermac: 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>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 7de69dbf
...@@ -240,8 +240,8 @@ static void i2c_powermac_create_one(struct i2c_adapter *adap, ...@@ -240,8 +240,8 @@ static void i2c_powermac_create_one(struct i2c_adapter *adap,
strncpy(info.type, type, sizeof(info.type)); strncpy(info.type, type, sizeof(info.type));
info.addr = addr; info.addr = addr;
newdev = i2c_new_device(adap, &info); newdev = i2c_new_client_device(adap, &info);
if (!newdev) if (IS_ERR(newdev))
dev_err(&adap->dev, dev_err(&adap->dev,
"i2c-powermac: Failure to register missing %s\n", "i2c-powermac: Failure to register missing %s\n",
type); type);
...@@ -359,8 +359,8 @@ static void i2c_powermac_register_devices(struct i2c_adapter *adap, ...@@ -359,8 +359,8 @@ static void i2c_powermac_register_devices(struct i2c_adapter *adap,
info.irq = irq_of_parse_and_map(node, 0); info.irq = irq_of_parse_and_map(node, 0);
info.of_node = of_node_get(node); info.of_node = of_node_get(node);
newdev = i2c_new_device(adap, &info); newdev = i2c_new_client_device(adap, &info);
if (!newdev) { if (IS_ERR(newdev)) {
dev_err(&adap->dev, "i2c-powermac: Failure to register" dev_err(&adap->dev, "i2c-powermac: Failure to register"
" %pOF\n", node); " %pOF\n", node);
of_node_put(node); of_node_put(node);
......
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