From: Wolfram Sang Date: Sat, 8 Jun 2019 10:55:52 +0000 (+0200) Subject: misc: isl29003: simplify getting the adapter of a client X-Git-Tag: v5.15~5978^2~103 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a0911a06c238a3ae7dfcd4ea309b0a280c4e5ff;p=platform%2Fkernel%2Flinux-starfive.git misc: isl29003: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/isl29003.c b/drivers/misc/isl29003.c index 3431a82..5d0d0c3 100644 --- a/drivers/misc/isl29003.c +++ b/drivers/misc/isl29003.c @@ -377,7 +377,7 @@ static int isl29003_init_client(struct i2c_client *client) static int isl29003_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 isl29003_data *data; int err = 0;