Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1164553ybi; Sat, 8 Jun 2019 04:01:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+R7VTfq6OuUvVB31Wps1SGaz1hm7zGVJT2q/4uz3YNHncsFnJmshXGOi6i5MaCjDcRBmF X-Received: by 2002:a63:950d:: with SMTP id p13mr7049152pgd.269.1559991686034; Sat, 08 Jun 2019 04:01:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991686; cv=none; d=google.com; s=arc-20160816; b=TzF97iPtp1GRlhLMPsnI6r3wU9Ryg/S1DU9Otr4r1F7PZH5o6yojpLrcxl3TAty8cD joabwSHqbkbN25fK+F05OzHWkrfC7SGg/omcMBk/hPy0BIrzdAuicJzzuLeI8Ocg4Arp 4OwolZ8nIdr86P/j8/Ix3FrmGfNj9D9ugu9HisTAT+aRlb/2w+Fp8YmDzQMxhE/QbzDX r/MD97Qj44nE+U/IdybvE15qqEpR5G4EZapuTz4JkejiUfFBQgqo3fqDQjf0Qra+f47n lE2RJHVjI0Qlq3f8dagQJXmA4DIZPMrC+MOf1bEro3VEajivfnwxbTcDaqZ38gCqVURL v7hQ== 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=mT1x8Xq2SEw7HFhbpcWq8cD2FCInuWtrI27oIP1dz20=; b=qAmTaXlRPqoJLG+KXdnfLsWMUizp1ZUZFUa00ycBji5BiuQA3PVlGsTwGJI0GGS4vC cysbFZQh+KbmN4WlOckNPczNryWjsoao/c3OT+vOMJFN5n58xQHlQj7UVvJcOkJpOVJz xrk8Jni/m2W9v2/v4mwELO0iagERppTbT3rR7INywmjk03gPFlS2BxMYu5yRsoRQ6m3P g/TeVdF6jeBSs8EjG4ouuJIpTOiVtdmBlYdsvmqL0EZj28X1BLKmDKfRm4QMhjrCSrF9 9thFWkMgjEceaUOWHFuf8rbg0AOedADMDPekzBCpE2icbRePpe0krwJo9ohN4QFfkMNn yUCA== 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 q34si2763821pgb.251.2019.06.08.04.01.10; Sat, 08 Jun 2019 04:01:26 -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 S1727304AbfFHK7Z (ORCPT + 99 others); Sat, 8 Jun 2019 06:59:25 -0400 Received: from sauhun.de ([88.99.104.3]:51874 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbfFHK4s (ORCPT ); Sat, 8 Jun 2019 06:56:48 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id BE5C93E4770; Sat, 8 Jun 2019 12:56:46 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/34] media: i2c: tw9910: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:55:50 +0200 Message-Id: <20190608105619.593-12-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/media/i2c/tw9910.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/i2c/tw9910.c b/drivers/media/i2c/tw9910.c index 4d7cd736b930..a25a350b0ddc 100644 --- a/drivers/media/i2c/tw9910.c +++ b/drivers/media/i2c/tw9910.c @@ -934,8 +934,7 @@ static int tw9910_probe(struct i2c_client *client, { struct tw9910_priv *priv; struct tw9910_video_info *info; - struct i2c_adapter *adapter = - to_i2c_adapter(client->dev.parent); + struct i2c_adapter *adapter = client->adapter; int ret; if (!client->dev.platform_data) { -- 2.19.1