projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a0911a
)
misc: tsl2550: simplify getting the adapter of a client
author
Wolfram Sang
<wsa+renesas@sang-engineering.com>
Sat, 8 Jun 2019 10:55:53 +0000
(12:55 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 10 Jun 2019 15:29:50 +0000
(17:29 +0200)
We have a dedicated pointer for that, so use it. Much easier to read and
less computation involved.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/tsl2550.c
patch
|
blob
|
history
diff --git
a/drivers/misc/tsl2550.c
b/drivers/misc/tsl2550.c
index 5b7afd6190fee6b932d3aaf36449fc76fe4d38e6..09db397df287cd5a07314c18530206e42e664ede 100644
(file)
--- a/
drivers/misc/tsl2550.c
+++ b/
drivers/misc/tsl2550.c
@@
-336,7
+336,7
@@
static struct i2c_driver tsl2550_driver;
static int tsl2550_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- struct i2c_adapter *adapter =
to_i2c_adapter(client->dev.parent)
;
+ struct i2c_adapter *adapter =
client->adapter
;
struct tsl2550_data *data;
int *opmode, err = 0;