Received: by 10.223.185.116 with SMTP id b49csp1148078wrg; Wed, 21 Feb 2018 13:00:41 -0800 (PST) X-Google-Smtp-Source: AH8x224eWpsBMgDK8FVeQuMBuSIxIPTtNUGoO8NnIX7HMGrNkzDN3ZcwCoIP5GElWqAZimbngfKo X-Received: by 2002:a17:902:20c9:: with SMTP id v9-v6mr4311091plg.41.1519246841421; Wed, 21 Feb 2018 13:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519246841; cv=none; d=google.com; s=arc-20160816; b=xraXl8ZqQv3zlwsvYsUuOGWzl8tUblEdJc3Nux59CUUnNzDDCNd5WZ/XtpslvhDEg4 /6UTFolvSROhk2xTNR1vRpZD6YkSaZwAXwe4nBcA02Oj/Qu/0VoAB7FXehC3pAiM9OzW D0jSnVjOiDCl7fXO8uHB03rx2epwd/zNTiKL7nkVgOHuxfI14heUqZk8POW8431I4ibG 9LT1j8NnY04P+WFO7hpQkizhlbKoJ7HnJVfQNasyvZAwTBBlLIJf3tf5b8poAJW3uzfu KJteddlkuC5hnYAa43D4m+of905qz9fEoUNFJ6vE33MZnMOUU5rlRmIrHkCFbM8h3bmr LqUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=lJLPolyel9Xoe8j2loXakyFIPDih44t9IoKPsupxx2k=; b=K4g8z0OT2pgMcJ1oOsy5JRZP65v2zb3W9aapscKG9YuW+cuCVVrRegrC59EKkcks6z Z783R80R6mb6ERsPIJUGkPZAqxCTsylnbOpu4dtT/lEyvpmhBJOeoSdGW9CMLDW335XT 0ouJRFiCnj/B4YHfm41Af1eXKeuX2dkWL+x9KuU4+tGTQYS6wq6wMOydQeGj8o9Vu7/A gYq9N5IeT1em/EMePnZg51MXhL57fMPDcEweyr5qw7WiuOxJAML7RiZnvrHCz0aLIdxO Tkxk2nqGWHEa+nTrlxyW4JtWavyHJEnJndbCgEg/aNLZJCJLM0Kfd5+mML192w4Xj3Yu KlzQ== 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 u187si13131pgc.451.2018.02.21.13.00.27; Wed, 21 Feb 2018 13:00:41 -0800 (PST) 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 S1752219AbeBUU6U (ORCPT + 99 others); Wed, 21 Feb 2018 15:58:20 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:47094 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752167AbeBUU6F (ORCPT ); Wed, 21 Feb 2018 15:58:05 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 06242207F0; Wed, 21 Feb 2018 21:58:02 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [88.191.26.124]) by mail.free-electrons.com (Postfix) with ESMTPSA id EC1CD213E1; Wed, 21 Feb 2018 21:57:19 +0100 (CET) From: Alexandre Belloni To: linux-rtc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alexandre Belloni Subject: [PATCH 100/100] rtc: pcf85063: remove useless indirection Date: Wed, 21 Feb 2018 21:56:35 +0100 Message-Id: <20180221205635.31314-101-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180221205635.31314-1-alexandre.belloni@bootlin.com> References: <20180221205635.31314-1-alexandre.belloni@bootlin.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pcf85063_get_datetime and pcf85063_set_datetime are only used after casting dev to an i2c_client. Remove that useless indirection. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-pcf85063.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c index 6ad4511d7ee1..3558433e8787 100644 --- a/drivers/rtc/rtc-pcf85063.c +++ b/drivers/rtc/rtc-pcf85063.c @@ -81,8 +81,9 @@ static int pcf85063_start_clock(struct i2c_client *client, u8 ctrl1) return 0; } -static int pcf85063_get_datetime(struct i2c_client *client, struct rtc_time *tm) +static int pcf85063_rtc_read_time(struct device *dev, struct rtc_time *tm) { + struct i2c_client *client = to_i2c_client(dev); int rc; u8 regs[7]; @@ -117,8 +118,9 @@ static int pcf85063_get_datetime(struct i2c_client *client, struct rtc_time *tm) return 0; } -static int pcf85063_set_datetime(struct i2c_client *client, struct rtc_time *tm) +static int pcf85063_rtc_set_time(struct device *dev, struct rtc_time *tm) { + struct i2c_client *client = to_i2c_client(dev); int rc; u8 regs[7]; u8 ctrl1; @@ -172,16 +174,6 @@ static int pcf85063_set_datetime(struct i2c_client *client, struct rtc_time *tm) return 0; } -static int pcf85063_rtc_read_time(struct device *dev, struct rtc_time *tm) -{ - return pcf85063_get_datetime(to_i2c_client(dev), tm); -} - -static int pcf85063_rtc_set_time(struct device *dev, struct rtc_time *tm) -{ - return pcf85063_set_datetime(to_i2c_client(dev), tm); -} - static const struct rtc_class_ops pcf85063_rtc_ops = { .read_time = pcf85063_rtc_read_time, .set_time = pcf85063_rtc_set_time -- 2.16.1