From patchwork Thu Oct 2 07:53:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 5016741 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A748F9F348 for ; Thu, 2 Oct 2014 07:54:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA43720272 for ; Thu, 2 Oct 2014 07:54:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C8B3F2026F for ; Thu, 2 Oct 2014 07:54:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752105AbaJBHxs (ORCPT ); Thu, 2 Oct 2014 03:53:48 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:48367 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821AbaJBHxq (ORCPT ); Thu, 2 Oct 2014 03:53:46 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s927ri9x013692; Thu, 2 Oct 2014 02:53:44 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s927rhcS022684; Thu, 2 Oct 2014 02:53:43 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Thu, 2 Oct 2014 02:53:43 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s927rgXb007813; Thu, 2 Oct 2014 02:53:43 -0500 From: Jyri Sarha To: , , Mike Turquette , CC: , , Jyri Sarha Subject: [PATCH 2/2] clk: gpio-gate: Rename the struct from clk_gpio to clk_gpio_gate Date: Thu, 2 Oct 2014 10:53:32 +0300 Message-ID: <5ca791d0bda38fe4cc3da4d6bde7e0a374822ee1.1412234778.git.jsarha@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I forgot to change this when changing the clk name from clk_gpio to clk_gpio_gate. Since I already changed the comment above the struct definition it is better to go all the way. Signed-off-by: Jyri Sarha --- drivers/clk/clk-gpio-gate.c | 22 +++++++++++----------- include/linux/clk-provider.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/clk/clk-gpio-gate.c b/drivers/clk/clk-gpio-gate.c index a648761..053939a 100644 --- a/drivers/clk/clk-gpio-gate.c +++ b/drivers/clk/clk-gpio-gate.c @@ -28,11 +28,11 @@ * parent - fixed parent. No clk_set_parent support */ -#define to_clk_gpio(_hw) container_of(_hw, struct clk_gpio, hw) +#define to_clk_gpio(_hw) container_of(_hw, struct clk_gpio_gate, hw) static int clk_gpio_gate_enable(struct clk_hw *hw) { - struct clk_gpio *clk = to_clk_gpio(hw); + struct clk_gpio_gate *clk = to_clk_gpio(hw); gpiod_set_value(clk->gpiod, 1); @@ -41,14 +41,14 @@ static int clk_gpio_gate_enable(struct clk_hw *hw) static void clk_gpio_gate_disable(struct clk_hw *hw) { - struct clk_gpio *clk = to_clk_gpio(hw); + struct clk_gpio_gate *clk = to_clk_gpio(hw); gpiod_set_value(clk->gpiod, 0); } static int clk_gpio_gate_is_enabled(struct clk_hw *hw) { - struct clk_gpio *clk = to_clk_gpio(hw); + struct clk_gpio_gate *clk = to_clk_gpio(hw); return gpiod_get_value(clk->gpiod); } @@ -71,7 +71,7 @@ struct clk *clk_register_gpio_gate(struct device *dev, const char *name, const char *parent_name, struct gpio_desc *gpiod, unsigned long flags) { - struct clk_gpio *clk_gpio = NULL; + struct clk_gpio_gate *clk_gpio_gate = NULL; struct clk *clk = ERR_PTR(-EINVAL); struct clk_init_data init = { NULL }; unsigned long gpio_flags; @@ -89,9 +89,9 @@ struct clk *clk_register_gpio_gate(struct device *dev, const char *name, return ERR_PTR(err); } - clk_gpio = kzalloc(sizeof(struct clk_gpio), GFP_KERNEL); + clk_gpio_gate = kzalloc(sizeof(struct clk_gpio_gate), GFP_KERNEL); - if (!clk_gpio) { + if (!clk_gpio_gate) { clk = ERR_PTR(-ENOMEM); goto clk_register_gpio_gate_err; } @@ -102,15 +102,15 @@ struct clk *clk_register_gpio_gate(struct device *dev, const char *name, init.parent_names = (parent_name ? &parent_name : NULL); init.num_parents = (parent_name ? 1 : 0); - clk_gpio->gpiod = gpiod; - clk_gpio->hw.init = &init; + clk_gpio_gate->gpiod = gpiod; + clk_gpio_gate->hw.init = &init; - clk = clk_register(dev, &clk_gpio->hw); + clk = clk_register(dev, &clk_gpio_gate->hw); if (!IS_ERR(clk)) return clk; - kfree(clk_gpio); + kfree(clk_gpio_gate); clk_register_gpio_gate_err: gpiod_put(gpiod); diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index ec1581b..860cb0c 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -498,7 +498,7 @@ struct clk *clk_register_composite(struct device *dev, const char *name, * Implements .enable, .disable and .is_enabled */ -struct clk_gpio { +struct clk_gpio_gate { struct clk_hw hw; struct gpio_desc *gpiod; };