From patchwork Sat Mar 31 08:33:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 149813 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 14C4AB6F98 for ; Sat, 31 Mar 2012 19:36:18 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SDtlJ-0002iz-Eb; Sat, 31 Mar 2012 08:34:17 +0000 Received: from mail-iy0-f177.google.com ([209.85.210.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SDtl8-0002hx-Md for linux-arm-kernel@lists.infradead.org; Sat, 31 Mar 2012 08:34:07 +0000 Received: by mail-iy0-f177.google.com with SMTP id y10so2442256iak.36 for ; Sat, 31 Mar 2012 01:34:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=cibGq0XFkJT5bocOy4Y+r0zXs3HZ05IaT/6XM2776as=; b=AzfEaDFP5YeN0SzlGFL7Oe38H8Cih+zoBsHqq0MkR0Fi5hDMH60JA8rDXSly3UZT/F QTXrCtBtqAeqH/xWA2zY9MMeq/08bFrm8Tzr4WMqF7WYHP7IQHZQp0TX8AFHw+gMRXv7 yno2DxtzPAiqKfjg0tEfkFn3PIW2HO1wOSl732uXPYqwloqKhxgYmmPDkYXaAo4JJ0o7 DHI3LpcL0tLwexQx7AWQ/4efjOYJcG2zZZ+y5ZICCmj38Kq6eKn0kUxpspauL5L4Tkun j5hk4yiKROlLumhOuqKNa3Xc8Cj3kw/9otAhMDwkqoG3u7Z6GoT1vqKG10NcLfLBIZGg GjFg== Received: by 10.50.192.228 with SMTP id hj4mr815555igc.65.1333182846562; Sat, 31 Mar 2012 01:34:06 -0700 (PDT) Received: from localhost.localdomain ([58.208.96.125]) by mx.google.com with ESMTPS id df1sm3518681igb.12.2012.03.31.01.34.02 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 31 Mar 2012 01:34:05 -0700 (PDT) From: Shawn Guo To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] regulator: rename function regulator_register_fixed Date: Sat, 31 Mar 2012 16:33:32 +0800 Message-Id: <1333182812-423-2-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1333182812-423-1-git-send-email-shawn.guo@linaro.org> References: <1333182812-423-1-git-send-email-shawn.guo@linaro.org> X-Gm-Message-State: ALoCoQkyZlktTacw2Srpik0/xFt0oUjpbZpX17qjBXYUjioh9hRxnJaLi4/O4wuk5BgdRhHAnM+L X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.177 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Mark Brown , Sascha Hauer , Shawn Guo X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Function regulator_register_fixed() is only meant for registering fixed dummy regulators. Rename it to regulator_register_fixed_dummy() for the explicit meaning, so that people do not attempt to register those real fixed regulators with this function. It also removes the kernel doc for @name which is not a parameter for the function at all. Signed-off-by: Shawn Guo --- arch/arm/mach-imx/mach-pcm037.c | 3 ++- arch/arm/plat-mxc/3ds_debugboard.c | 3 ++- drivers/regulator/fixed-helper.c | 5 ++--- include/linux/regulator/fixed.h | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index 5fddf94..d8ceaba 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c @@ -586,7 +586,8 @@ static void __init pcm037_init(void) imx31_soc_init(); - regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); + regulator_register_fixed_dummy(0, dummy_supplies, + ARRAY_SIZE(dummy_supplies)); mxc_iomux_set_gpr(MUX_PGP_UH2, 1); diff --git a/arch/arm/plat-mxc/3ds_debugboard.c b/arch/arm/plat-mxc/3ds_debugboard.c index d1e31fa..5e3cdf1 100644 --- a/arch/arm/plat-mxc/3ds_debugboard.c +++ b/arch/arm/plat-mxc/3ds_debugboard.c @@ -195,7 +195,8 @@ int __init mxc_expio_init(u32 base, u32 p_irq) irq_set_chained_handler(p_irq, mxc_expio_irq_handler); /* Register Lan device on the debugboard */ - regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); + regulator_register_fixed_dummy(0, dummy_supplies, + ARRAY_SIZE(dummy_supplies)); smsc911x_resources[0].start = LAN9217_BASE_ADDR(base); smsc911x_resources[0].end = LAN9217_BASE_ADDR(base) + 0x100 - 1; diff --git a/drivers/regulator/fixed-helper.c b/drivers/regulator/fixed-helper.c index efb52dc..b24c90b 100644 --- a/drivers/regulator/fixed-helper.c +++ b/drivers/regulator/fixed-helper.c @@ -17,13 +17,12 @@ static void regulator_fixed_release(struct device *dev) } /** - * regulator_register_fixed - register a no-op fixed regulator - * @name: supply name + * regulator_register_fixed_dummy - register a dummy no-op fixed regulator * @id: platform device id * @supplies: consumers for this regulator * @num_supplies: number of consumers */ -struct platform_device *regulator_register_fixed(int id, +struct platform_device *regulator_register_fixed_dummy(int id, struct regulator_consumer_supply *supplies, int num_supplies) { struct fixed_regulator_data *data; diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h index 936a7d8..2a956a9 100644 --- a/include/linux/regulator/fixed.h +++ b/include/linux/regulator/fixed.h @@ -51,10 +51,10 @@ struct fixed_voltage_config { struct regulator_consumer_supply; #if IS_ENABLED(CONFIG_REGULATOR) -struct platform_device *regulator_register_fixed(int id, +struct platform_device *regulator_register_fixed_dummy(int id, struct regulator_consumer_supply *supplies, int num_supplies); #else -static inline struct platform_device *regulator_register_fixed(int id, +static inline struct platform_device *regulator_register_fixed_dummy(int id, struct regulator_consumer_supply *supplies, int num_supplies) { return NULL;