Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1163247ybi; Sat, 8 Jun 2019 04:00:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbqWddxc5x1kF1siZv0EvMQ5tVjM7qPc+M61f/i1KQnJss+qwLjt7p96adCUJ/66TUrgdv X-Received: by 2002:a63:87c8:: with SMTP id i191mr7118813pge.131.1559991604156; Sat, 08 Jun 2019 04:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991604; cv=none; d=google.com; s=arc-20160816; b=WpucnH+LXm40G+ECfbQGb9/nnDmUceJv/HF7l0Nt9fOUqNhTfEDkeizjM+n1FS4QbU F+qd6rcTz4Q4DsjuBJwnzGeSXDfPQ3yZy5mqm4XUC7G5sIYaWs0TQVspBNAPzTtkVY3a A59Hpb3lF+GXBH+z8+3c8wuvVhdR0frfcmciDJgKmJcejIyVVvatmdTSi6wm+uAGlKLj vzZ/buZk60vI6IAPoFKS/JErxMMXK09sPmA8GriW4e2+Glw/kI5jQU73D85/iDmSufiv qtJu+AdlK+MYdEqKZrwOSY3dXO73UWlnQuhfMB0UaVBcvtpiAKJuM07FveLI13+esVLn 8OAg== 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=SaIEWZ1awnwgV3lfPliDNbo9FFJHikKFr/HslF6UUms=; b=FvGOFDUED4+8WFPkoarwT086qxTBoFkwVvWiaYc+98tvIPQdhcg1vTAgfo+11GUXYG xkdDF+QhJFHOanLaKyIMzn9rNC/zdYE+dWZKzEkKjZH1cjGi7tanN2Ng7s+cEp5Vn/gV qKR/7xbfAzDa0JOran1iQyTcdhgoL2CxVfXB4ZpKgzp26ICmNf88t1AOHUxGEmCJ/jkt XwY9/2BxVEiE5Bo2S7GGxwrmiHOGHHdOW+1pICiSxfYQi4/8CEWlaZduPR8T4sR5juxv Pjv+H777kOLh6ktW3SA9NXB81t+w7mpOIYET1keYNp1hLSqJFRIttVaPRDo82SarXaIt 7mLQ== 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 m74si4568665pga.410.2019.06.08.03.59.48; Sat, 08 Jun 2019 04:00:04 -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 S1727272AbfFHK5M (ORCPT + 99 others); Sat, 8 Jun 2019 06:57:12 -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 S1727197AbfFHK5A (ORCPT ); Sat, 8 Jun 2019 06:57:00 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id EE3A03E47A1; Sat, 8 Jun 2019 12:56:58 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Guenter Roeck , Heikki Krogerus , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 34/34] usb: typec: tcpm: fusb302: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:56:13 +0200 Message-Id: <20190608105619.593-35-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/usb/typec/tcpm/fusb302.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c index 7302f7501ec9..c524088246ee 100644 --- a/drivers/usb/typec/tcpm/fusb302.c +++ b/drivers/usb/typec/tcpm/fusb302.c @@ -1697,13 +1697,12 @@ static int fusb302_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct fusb302_chip *chip; - struct i2c_adapter *adapter; + struct i2c_adapter *adapter = client->adapter; struct device *dev = &client->dev; const char *name; int ret = 0; u32 v; - adapter = to_i2c_adapter(client->dev.parent); if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) { dev_err(&client->dev, "I2C/SMBus block functionality not supported!\n"); -- 2.19.1