Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1164826ybi; Sat, 8 Jun 2019 04:01:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFGSnUwgmjGXJda1o/WWhhn0Txq6m8X6Rzspc603zjWBPHyJRNetz9brf1FRZNL7muhAfS X-Received: by 2002:a17:90a:8d0d:: with SMTP id c13mr10244338pjo.137.1559991702132; Sat, 08 Jun 2019 04:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991702; cv=none; d=google.com; s=arc-20160816; b=A5fUstrb1OofaRGA11giXWh1sadHPF57HtIxbJdoJ3+2cHom+xjNiFNfdrc31IQL5e bka14JnS/IWCHrpHeN29w7OPA1qXAvn390ohJfA7IsoFwgSpLoPXqpqyOUXM+0tDPQJ4 3wIRxrTxQRWe+sb03BTk/F8YLNO053yShYTKXA89uKlX30Uo3TDMuGRHcYJF9WtXTCJ1 2zXp2hKcapbTG8vFSSgk836KiQfoVxzFdQRb2SAVmnfOgH2Awn+Qz7p8btRwsj4Ev+nc vDtldp3Up5DKJO/Fxq6rq01rMRI1N/DwATdTs/57caK0BrwNQPHXGICJhqlEXSsauAlI TaYg== 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=A1lIurZsdOFNI8yA7AMh93TsydG8ohC3XW4LgN5b6aw=; b=OSuI+nPsommhmQL3l2PyGt3/4k2ZiSOdjQVF7iVIfJrLRN9su1/6yCDWKXBxGB2qWl 3fqqBfncJqK7rcvdyKLteRyZzAW1aptr36hLnVBhfj7Jmuzepbzp/tiFsuTLueWzM5RK BEacvJ/npu38+D6mMFPNEGvqJTP1qNn6IJovqS7KRFyDuGh9p1xCTW690y5DCyHGcazM P1SZMgOw3PXQQ11/u/vLJKUFzs8O5gZ/WDBLn9O4x2X06Q6GLg16FnGo7Z4LcxiCuu4h v55MkqvnWv8PCnT67eL9zvTRaVBGO4dLS536cVuFmYpaiZM2nQ3G9r7tsLuUEj1J/Pth 9CAA== 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 b9si4322437pjo.95.2019.06.08.04.01.25; Sat, 08 Jun 2019 04:01:42 -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 S1726976AbfFHK4q (ORCPT + 99 others); Sat, 8 Jun 2019 06:56:46 -0400 Received: from sauhun.de ([88.99.104.3]:51806 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726832AbfFHK4n (ORCPT ); Sat, 8 Jun 2019 06:56:43 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id EA0153E43B9; Sat, 8 Jun 2019 12:56:41 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Andrzej Hajda , Laurent Pinchart , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/34] gpu: drm: bridge: sii9234: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:55:41 +0200 Message-Id: <20190608105619.593-3-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/gpu/drm/bridge/sii9234.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/sii9234.c b/drivers/gpu/drm/bridge/sii9234.c index b36bbafb0e43..25d4ad8c7ad6 100644 --- a/drivers/gpu/drm/bridge/sii9234.c +++ b/drivers/gpu/drm/bridge/sii9234.c @@ -815,7 +815,7 @@ static irqreturn_t sii9234_irq_thread(int irq, void *data) static int sii9234_init_resources(struct sii9234 *ctx, struct i2c_client *client) { - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); + struct i2c_adapter *adapter = client->adapter; int ret; if (!ctx->dev->of_node) { @@ -897,7 +897,7 @@ static const struct drm_bridge_funcs sii9234_bridge_funcs = { static int sii9234_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 sii9234 *ctx; struct device *dev = &client->dev; int ret; -- 2.19.1