Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1165096ybi; Sat, 8 Jun 2019 04:01:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+LHfPHdCHPLBV0xpBCJiyZV8h6fhXRyV0AhP4eYi6Y58akJaJyOh7TCQ72gALVZwjk1Z6 X-Received: by 2002:a62:1412:: with SMTP id 18mr30386748pfu.135.1559991718692; Sat, 08 Jun 2019 04:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991718; cv=none; d=google.com; s=arc-20160816; b=edkU8zXQqF4L8BSVVlRofrsmVQ0nz8Vvq/3SR5gdqXOkBGvKZpvdD5ky3B1ug/lL8X qJ5Ml1BxXIFOorjVUy+70cvKyvLAMeX43GY7jQ8mesm4KgSnLNEXB9IwcYDHI7AuHC6e mjWaKwbto/78GOMAX8g7++3kdEaG9DxPX7rSW5K8PH1nNzXlWxhpqDoWyNiOzOuY+UKS 8fL+Px0r6Fz40zkD2gIgIfZfun/i2uyMX5tiWXvM2mn4H9lYn7bIS9tditR5RiJL8fdI qAk5EjH1OrV7JkcX2cA0rTR16ldenPAeD0sDzqRVVSXNz4FH3I0NHMqpR/0siLicBDK0 34Jg== 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=pYWyAumGbHISj4V+zUURWKxJzQ0lYhUbSW2xXxHe0LU=; b=TXlh7LNB9oMURWCjms0YK7rMyKuIkCSXzP3paqZmeYYsVReN8pj5//K4291VOiuyG8 /KPZqcGsKntBVTXP/xy1lFfI6tgWqd4cqH2TPcVcQXG94ur0VTJY+jkWD1tMeXHgcuF/ luFeVMAdJX/B/lV21a/mf6ln8AoEMEErd8FaJYoZcRDXWsm3LCIG3JOTzBmy2Y0f+khJ NczZGzn70WacoA+pQtD5Koj6LLAr4fmdw3k8VtAmlM14/Up4LVo4WdRdgXu/lHSdCOMQ LsZ/TP8BK5PMB2mf2Vqml8ffyY/ekn3SnMqjSCkhGvFmB+BCCrr3vb/i7wLFv0qdFHdm kgfA== 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 j8si4413567pfh.239.2019.06.08.04.01.42; Sat, 08 Jun 2019 04:01:58 -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 S1727290AbfFHK74 (ORCPT + 99 others); Sat, 8 Jun 2019 06:59:56 -0400 Received: from sauhun.de ([88.99.104.3]:51862 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726876AbfFHK4p (ORCPT ); Sat, 8 Jun 2019 06:56:45 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id 8AA313E4771; Sat, 8 Jun 2019 12:56:43 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Jacek Anaszewski , Pavel Machek , Dan Murphy , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/34] leds: leds-tca6507: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:55:44 +0200 Message-Id: <20190608105619.593-6-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/leds/leds-tca6507.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c index c59035e157d1..58be20cae183 100644 --- a/drivers/leds/leds-tca6507.c +++ b/drivers/leds/leds-tca6507.c @@ -758,7 +758,7 @@ static int tca6507_probe(struct i2c_client *client, int err; int i = 0; - adapter = to_i2c_adapter(client->dev.parent); + adapter = client->adapter; pdata = dev_get_platdata(&client->dev); if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) -- 2.19.1