Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp232864yba; Fri, 3 May 2019 00:19:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqynmB+UuozZ+6l/1s7ZGKkkuHDcEKiHbtGXRy6mH/HkHk7X9Wui3GC9IrNTOfZSxs95Ycmg X-Received: by 2002:a63:dc50:: with SMTP id f16mr8508505pgj.396.1556867969190; Fri, 03 May 2019 00:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556867969; cv=none; d=google.com; s=arc-20160816; b=HN3aHmJkbPpTrkyi9HO71cwW5tK+/8M2kwvspCksgMnV1l4MHajgMGNi39UJJQZVPW eaR1bpguUYEVkQZXzoG8E3y0oGlvc+75Bw77y5yiGR7q38XOboQR1WflJ5u9hY+1rtEf L9YF8A6o5DmccPyt/9/9505Yefo+p1Egsjsqceh1bjnC8rXrmc425pfOvLkoG06hcv1n ZIqEAwTFbaec0IrfDdRJe5PHrf2GZrGjI0RkZlAqIJnWOZ5WS1c1MeQCr2Petlc4tf2F z0gVeAwfpQNMDj0aHtbRCA00POo1Rrd8TruESCE9CScRWdqjFBllXQVxjSwUlKC5GiU0 tgZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature; bh=uJRhtLsdNNAJveJ+s2NSgBPxfvfgbqKbRQ8fG+F4ZtQ=; b=MnIr/B0SsU2Yw1fXRfkJIJVhMpobHS9CuZlY6j75xvYGas8sEgE87/chdk1OGca1gF z+ugkxb1PggnVGU3laesWv7RDVCebYUjvbBk52g4gNVW6WKNe5lrAsf1xC9WuxTJ52CX +xfySfnhEavIM4Z4HO7Mfy7VrJ3m4HcNbN3umvMbUKZdzdva2xehv3gpfpxcA8Efbi2I 039RAIK6F9VvZCe0i5gBv1zybDISWO5uXLl8g96Yq9ECgYslqquWzta002otiQS2n4eu dePgZPax2wIfgvlndUz6iEEtCCGTs/jZHszEM0U3A4jij84GrpWNk3e0vGLHdnqmqfFL 14MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=EpiYeFc2; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bf9si1433576plb.85.2019.05.03.00.19.12; Fri, 03 May 2019 00:19:29 -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; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=EpiYeFc2; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726898AbfECGTJ (ORCPT + 99 others); Fri, 3 May 2019 02:19:09 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:53224 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726826AbfECGTB (ORCPT ); Fri, 3 May 2019 02:19:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=uJRhtLsdNNAJveJ+s2NSgBPxfvfgbqKbRQ8fG+F4ZtQ=; b=EpiYeFc2gBU5 WCworeBojym7JVod3w8cpM7Bv7QsF9f8ZBSSwpRgjJofdctwIJFRH6FioRGkKM76VngiOy4gsDG7h zcW+GBomTWex2MpWPhHplD1b2UfCklyslMqvfDrpp7QqcR5mEmPsoFuyayzXeUmrA73SLnLf1A80i ZhYug=; Received: from [42.29.24.106] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hMRX6-0000Yg-Ac; Fri, 03 May 2019 06:18:57 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 659BD441D3C; Fri, 3 May 2019 07:18:49 +0100 (BST) From: Mark Brown To: Axel Lin Cc: Liam Girdwood , Linus Walleij , linux-kernel@vger.kernel.org, Mark Brown Subject: Applied "regulator: ab3100: Constify regulator_ops and ab3100_regulator_desc" to the regulator tree In-Reply-To: <20190502142233.24730-1-axel.lin@ingics.com> X-Patchwork-Hint: ignore Message-Id: <20190503061849.659BD441D3C@finisterre.ee.mobilebroadband> Date: Fri, 3 May 2019 07:18:49 +0100 (BST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch regulator: ab3100: Constify regulator_ops and ab3100_regulator_desc has been applied to the regulator tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.2 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 95602d7d77f502d656e648ab38f8e0586364e7dc Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 2 May 2019 22:22:32 +0800 Subject: [PATCH] regulator: ab3100: Constify regulator_ops and ab3100_regulator_desc These regulator_ops variables and ab3100_regulator_desc array never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- drivers/regulator/ab3100.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c index c92966a79a7e..edde907a7062 100644 --- a/drivers/regulator/ab3100.c +++ b/drivers/regulator/ab3100.c @@ -353,14 +353,14 @@ static int ab3100_get_voltage_regulator_external(struct regulator_dev *reg) return 0; } -static struct regulator_ops regulator_ops_fixed = { +static const struct regulator_ops regulator_ops_fixed = { .list_voltage = regulator_list_voltage_linear, .enable = ab3100_enable_regulator, .disable = ab3100_disable_regulator, .is_enabled = ab3100_is_enabled_regulator, }; -static struct regulator_ops regulator_ops_variable = { +static const struct regulator_ops regulator_ops_variable = { .enable = ab3100_enable_regulator, .disable = ab3100_disable_regulator, .is_enabled = ab3100_is_enabled_regulator, @@ -369,7 +369,7 @@ static struct regulator_ops regulator_ops_variable = { .list_voltage = regulator_list_voltage_table, }; -static struct regulator_ops regulator_ops_variable_sleepable = { +static const struct regulator_ops regulator_ops_variable_sleepable = { .enable = ab3100_enable_regulator, .disable = ab3100_disable_regulator, .is_enabled = ab3100_is_enabled_regulator, @@ -385,14 +385,14 @@ static struct regulator_ops regulator_ops_variable_sleepable = { * is an on/off switch plain an simple. The external * voltage is defined in the board set-up if any. */ -static struct regulator_ops regulator_ops_external = { +static const struct regulator_ops regulator_ops_external = { .enable = ab3100_enable_regulator, .disable = ab3100_disable_regulator, .is_enabled = ab3100_is_enabled_regulator, .get_voltage = ab3100_get_voltage_regulator_external, }; -static struct regulator_desc +static const struct regulator_desc ab3100_regulator_desc[AB3100_NUM_REGULATORS] = { { .name = "LDO_A", @@ -499,7 +499,7 @@ static int ab3100_regulator_register(struct platform_device *pdev, struct device_node *np, unsigned long id) { - struct regulator_desc *desc; + const struct regulator_desc *desc; struct ab3100_regulator *reg; struct regulator_dev *rdev; struct regulator_config config = { }; @@ -688,7 +688,7 @@ static int ab3100_regulators_probe(struct platform_device *pdev) /* Register the regulators */ for (i = 0; i < AB3100_NUM_REGULATORS; i++) { - struct regulator_desc *desc = &ab3100_regulator_desc[i]; + const struct regulator_desc *desc = &ab3100_regulator_desc[i]; err = ab3100_regulator_register(pdev, plfdata, NULL, NULL, desc->id); -- 2.20.1