Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1165264ybi; Sat, 8 Jun 2019 04:02:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyv1/3FwV+kNcRerfCCwDWyryPkdvhLqv/15IqSQJbx8yVR/+s3puw7Ol0krNxMxPZ0TupA X-Received: by 2002:a17:90a:a593:: with SMTP id b19mr10581693pjq.31.1559991728400; Sat, 08 Jun 2019 04:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991728; cv=none; d=google.com; s=arc-20160816; b=fA6QjbzqS0SSBBlkIpJzfHhhbZ8CIjLsbIDaq9J8p0QHbNVQTDULLVL1t+vhXx20dT 90eeQ910p69KVkg0BTd7ItQQ7oSLBm9g8sMcpIK5dLRSfoN4NoHsxYzesxx782qKVVWD uj68tU8fEfj+2yKHzx+8esg26eAO/lYIZ3PXucHZzuxvMBv+h8cvyHY3Gc6OmwzdGILF EaXum9aBtmCD1wfz61tWKS6x1wdT/JZ4O02nD3zCE9ZpnQNP5c/7Bi0kpDUlnGU3xKCw jxXKahtSob3UaT5hBtsHfcNUrxNHQ3KxSc20eLeejJfChFBPy2r2nahSGlrGm+Njyqjf QtoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=a2qOy24Y3Fp3Nl7yEsxhT/3qlbfqe+gf71Xprq8bIDo=; b=tGA0wW4p8ySME7kkJXIfPHylqdniMyjSkY+guH5iRkQuP1G2qhJQZgt3tqSwvyus+i 1rDAAHzn26XvPnQb+wjgaqUwi0N3jYITXaAsGMtZQLUfKD8fZpT21drfzFkDrPaovNQn AOZUk5WAcagUmKvyhAMlnaPfu4u+j2hHEtcP1GyN7ac6X79uVwtUi1mvX0jY76YLKRWQ xI4fyZG8lpQfvDkYETb9h48BzQjqUlPENtvOKBWyAsqld/skPdySPtushEA3szKu6CPe uNhPyWxZFh3iqUFYrCvy3ZhcVt4S6T7HaPp0/bvEAxnK/cpjz7qVb0IZWMbEuDtsvfMg OitA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k17si4459827pgg.426.2019.06.08.04.01.52; Sat, 08 Jun 2019 04:02:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727029AbfFHK4s (ORCPT + 99 others); Sat, 8 Jun 2019 06:56:48 -0400 Received: from sauhun.de ([88.99.104.3]:51826 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726841AbfFHK4o (ORCPT ); Sat, 8 Jun 2019 06:56:44 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id 7A9673E476F; Sat, 8 Jun 2019 12:56:42 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/34] iio: light: bh1780: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:55:42 +0200 Message-Id: <20190608105619.593-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190608105619.593-1-wsa+renesas@sang-engineering.com> References: <20190608105619.593-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang --- Please apply to your subsystem tree. drivers/iio/light/bh1780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/bh1780.c b/drivers/iio/light/bh1780.c index 340d64d0ac59..a8361006dcd9 100644 --- a/drivers/iio/light/bh1780.c +++ b/drivers/iio/light/bh1780.c @@ -146,7 +146,7 @@ static int bh1780_probe(struct i2c_client *client, { int ret; struct bh1780_data *bh1780; - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); + struct i2c_adapter *adapter = client->adapter; struct iio_dev *indio_dev; if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE)) -- 2.19.1