projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87e0743
)
i2c: i2c-core-of: convert to use i2c_new_client_device()
author
Wolfram Sang
<wsa+renesas@sang-engineering.com>
Tue, 7 Jan 2020 17:47:44 +0000
(18:47 +0100)
committer
Wolfram Sang
<wsa@the-dreams.de>
Wed, 15 Jan 2020 19:40:12 +0000
(20:40 +0100)
Move away from the deprecated API and return the shiny new ERRPTR where
useful.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core-of.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/i2c-core-of.c
b/drivers/i2c/i2c-core-of.c
index e4d296b40baae48019425bb1a8999c7bf7727833..6787c1f7148353732b1ed5ee144271d4f5b91f9a 100644
(file)
--- a/
drivers/i2c/i2c-core-of.c
+++ b/
drivers/i2c/i2c-core-of.c
@@
-75,11
+75,10
@@
static struct i2c_client *of_i2c_register_device(struct i2c_adapter *adap,
if (ret)
return ERR_PTR(ret);
- client = i2c_new_device(adap, &info);
- if (
!client) {
+ client = i2c_new_
client_
device(adap, &info);
+ if (
IS_ERR(client))
dev_err(&adap->dev, "of_i2c: Failure registering %pOF\n", node);
- return ERR_PTR(-EINVAL);
- }
+
return client;
}