Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1165097ybi; Sat, 8 Jun 2019 04:01:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqz33hfmZQTBknZ3Z4avB77F+WzsiNktwDdloN9EELPEYfM189pTDS3IIVxvKBNrxUtHJyR9 X-Received: by 2002:a65:60d9:: with SMTP id r25mr7028562pgv.228.1559991718688; 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=RGLNywGc+5LiQgSxUm3Y8WbT8a8JCP/d8Y9DtG1Kq+bBtxt+l00ysuUgugV2pTb1Gf 0C8JORRppd3tbiofb1PsMGi3XVtIq6THVB964ubP5huvwUOT2nk4sny0l1eI+eLb+B9N 9BzuDE7dYGlJ94gWpuarVuj2KRyg5Ye/LY2uRX/g6cLZnzUOThbxxd/eXjmB5xue5svl 1GSLZCnTz0PLrcEP5loaVw0KhU+oqBsRaAzzcSt0/qJLXDqjw/iwRwVzpdKIh7hEsjOb GbLDDFsUkax7TbgphX1Nv/OPuHTnv6ZObTAEOnewv5yeC9CfeA41SCO+qmfQXaDFtHTQ 0Ecg== 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=ag9IcuIGlw/7rZzC5LScGcA8jCF3jPiWbAxGunreG6s=; b=Mg+XwsGs3C55Dox8LE0ezP667a2q4iA8dMHm5chCOWbs3/nadT28tagoxdgtiMVy1d /yrcJplvjw4pFQ3SR3zi7IHpU9o/8JsfpbiboCla/WhnQ68EcBCiTi89xcOJHA1a/mXj 2XMjSVNy8HD3K2CXpTyD0Z86BbOlUDS6e3R3+Az2AZZwilKtmWQs2q93q1q1QOb9AphV jKJl18y5rcfrgL8ofR+KUpkcwWFEg4ioSJ0l/7VKpnOWxmKfzOkYT1g1jbwRWYh3/HS5 njauSD/2i6wSeyM1hMuh22A3ax1auUsd565/7QJ/Hw1JOPmcuLnnMmKKTMepvLAucRCZ l6gA== 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 q26si2808385pgl.114.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 S1727787AbfFHK75 (ORCPT + 99 others); Sat, 8 Jun 2019 06:59:57 -0400 Received: from sauhun.de ([88.99.104.3]:51850 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726835AbfFHK4o (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 097A43E4770; 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 04/34] leds: leds-pca955x: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:55:43 +0200 Message-Id: <20190608105619.593-5-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-pca955x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c index a9f5dad55956..460626d81c6a 100644 --- a/drivers/leds/leds-pca955x.c +++ b/drivers/leds/leds-pca955x.c @@ -432,7 +432,7 @@ static int pca955x_probe(struct i2c_client *client, int ngpios = 0; chip = &pca955x_chipdefs[id->driver_data]; - adapter = to_i2c_adapter(client->dev.parent); + adapter = client->adapter; pdata = dev_get_platdata(&client->dev); if (!pdata) { pdata = pca955x_get_pdata(client, chip); -- 2.19.1