Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753748AbdDKKC4 (ORCPT ); Tue, 11 Apr 2017 06:02:56 -0400 Received: from mail-by2nam01on0068.outbound.protection.outlook.com ([104.47.34.68]:14624 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753000AbdDKKCI (ORCPT ); Tue, 11 Apr 2017 06:02:08 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Dong Aisheng To: CC: , , , , , , Subject: [PATCH 4/6] regulator: anatop: remove unneeded name field of struct anatop_regulator Date: Wed, 12 Apr 2017 09:58:45 +0800 Message-ID: <1491962327-12477-4-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491962327-12477-1-git-send-email-aisheng.dong@nxp.com> References: <1491962327-12477-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131363785261776002;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39860400002)(39840400002)(39450400003)(39400400002)(39410400002)(39380400002)(39850400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(356003)(47776003)(305945005)(85426001)(77096006)(5660300001)(6666003)(2906002)(2950100002)(4326008)(54906002)(8656002)(5003940100001)(53936002)(189998001)(110136004)(38730400002)(39060400002)(104016004)(6916009)(33646002)(106466001)(2351001)(105606002)(50226002)(81166006)(8936002)(86362001)(8676002)(50986999)(48376002)(50466002)(76176999)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0301MB1295;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD028;1:AbFRjqU5nNYLkaR9CdpULJNDuOos5euZ60w5p53j6+0v8wGMZaJdPiqwqww5G1rEo+yGLq0T6yqq3R05HTiYiJYUa1kt62WLPiL01a+NRJcr8aZe+BS1C/UAsrkkqmuI9W7QGjQJE8vWwy6J+DBjsJb6NHk3zInqFnulen2MbeonXF1S0pF/ljdSilQS1/iYNKkQY4PF4Etdd0VZT/yJE3SvPthm52vIqVEQZwzxjUOnAn+bmtEKix3q1IdF7hPFVLgSorHOST9HKku5GVvINioaO5WsGUqU6bDVIKOfdPN4zxmxX/+Wp2CY7EmX4FMpcdqesiD1FaZwbKeiumMzooaWJtG62UwG8BDeyYlsavd6WYX9P8vt4iiiC4z0HKoYUtEAqY24fkbFRc10nG++HBUUUGNtl0x65hAvjvjxd4B3UA8O4xDeQs/7l3PrshSlNNfr4w+qjVHoRTETB3mZaqlUd5T3dyb8qWoUJol+a6hAin6ByuDglg6wuGyXEiFG0CMNHwN4IaWCwYTvwp4Syjb7r9gjE6yELBL1vVNV9MLYhj9ihMbJb4d86WjOmRU9VHiM8LxuyxRd3VkaqmYO1L+4g3cwEqWEIpwKPCk+fWuFkGyDxEQLGsTLfPuQ2vo46L9eqv7GkOS56n/wdBMJQsWLM3F9bfBoX9zFnH/W2udL6TqvMHS0/8CUQR5yGgR6ViFSp9dxGIE2lYCI4Ry2eV0vlEGG6GhtZ7kP8HhIFfM= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 5287f1e6-3bd2-4182-f18a-08d480c1cf44 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030255120)(201703131430075)(201703131517081);SRVR:DM2PR0301MB1295; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1295;3:vbyZpRLGBY/0oAMySh0vD7brXFg5qB3MN7PuZbzqlhcfUWEsddIW9XX6cv5XQIhsU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qROOqw05oPnla3nfwNotZ7o8RT6l6/PR/rXbal1R3y0KfRJDg3FzmAXXAlunz7LWZaJQ+CotlzMmzs+FyiAYqKj9FfK5k5kwt2BKDrbQeVDezHaX35Bgx7xhRdDNgMCK1Bne/lCjslfneq5w= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(601004)(2401047)(13017025)(13024025)(13023025)(13018025)(13015025)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259075)(20161123556025)(20161123563025)(20161123561025)(20161123565025);SRVR:DM2PR0301MB1295;BCL:0;PCL:0;RULEID:(400006);SRVR:DM2PR0301MB1295; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1295;4:oKKiAypHwMh/5997zNwMTMip0xrO7GXDotorIdG0D/XbhI6xmhS/gjteq2LZgdsGVNjAvD2gdIrTKtUfPZEcmfRLfDLNwqnRn20n9OxBCy4qsGA20E6A+K/Ehy8vqmagWFHCxr1V2LVp/UoMpWR1vOlHAB+L/XviNj21yba3ZdI6rDsGwbgZDC8iZ/AGyJJxu4xWvMIgOg1ASNpczZdP5q4uf6zLHAlLtzilX414bDdK/jjpjvMwtcCWRTh399oCX5C8x22j8U6zGvZY2snKkGXSkcMgcfoydlgwM+ft2j9RWmta5AZzTKQJer2NJK/i77rzbeTgnFfxwrDnxK9YilsXBk5Rg2kR8verfcKbklI5FWNqph4/hx6nhUqZgPz0FxOasdNYfkV+3ojmk0WldxFD9xAxlI3Bvo9c8NNCQ5sQEInfmn4auZH4o0xtK4UEvPzax7cUXscc7UyZ/TlWkemYgss8zbiEF+bKEu0gtpHfqC6uv3IPOlstKpaZxbnukuFNicQMntmKEpjLFJKdm1lHR1bW0FcAF/MbAGemHVTLUmC8At1BllRKw4LlrHB0R8UG1quwEy59RCzdP+W1cOxroy2H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UG/cBn2fhrw754xfRfzDdxgBkzvMDYsMfG?= =?us-ascii?Q?KUh3AmA9GfAaDVCzoYPyveA2gIhiWYvQChEam80ygFuNc8WLweClRgafUTlp?= =?us-ascii?Q?qbRW/ZepPwP8BQbQHGNf2s8qhnKp88/XFULZMAXv/lecAu7dkTykLGAtZjp4?= =?us-ascii?Q?8+DoEFepKJvT+uifp9LWrnSZglz9ahQXriY+84DeqGZJkd3oGo//4ZLJq4gq?= =?us-ascii?Q?eCtMlQUB1gMrXOHH1H8euMVt56+F/75BYCKko5BKqs1WvbGA5iwPn3TqnoqF?= =?us-ascii?Q?w2h98OavBYN5zMt/Bmg72Rlq4l7EKw9cmsRVCicx0tLuyjoobUR3FOlPlXyP?= =?us-ascii?Q?Bg9/j+C5eyusy2lili4kCKBG9fufAyvhZeXDhYhnmn4B2g8sxhBt5t7X+8ir?= =?us-ascii?Q?aVzSkjPO4Akorh6h3hJk8ffZ05N20xzTlqCV4790uMGZqyRaUm7mxQlo9UMt?= =?us-ascii?Q?8FXbY4I6UVwSFN0iu6EH+cA8tgg4Hsv1H6jOewhlZBQV4boTLlASXPG/IEFa?= =?us-ascii?Q?jYADr+FuxNXstyHzTnkrskoKPk5kQAC6MBFfTLrHIIRnQYsFpCPB/VK8KpwT?= =?us-ascii?Q?5xl+KgDSN9c8Yfplp11yZdJ2/QS51rUdmMQbbfXGF+8WV+Uqv4NhD56FSpfz?= =?us-ascii?Q?Ahp9f0+S7taJRQDQZN2Qcdlj/OnyxjKuIjVf4NI/H1rpGtCJuNHxUTDmCXFe?= =?us-ascii?Q?q7yeln7c9EvXwf+s1dfY=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1295;6:aGVSr0olGTfTKzNUfJWbEW2CG6xGwG5/IYifl9kzdNnzL57MAg0cxecDWkFL5hNCRJi19LIctNvD1GPW6ctRNwQ0UfWVOU84H6aVfiYl0TFFg9UhcVJPvo1kwaEQlfFwN0APrsGPnHlon5vlzgYczXrsYParIponmWd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rivalTime: 11 Apr 2017 10:02:05.8656 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB1295 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1709 Lines: 51 sreg->name is only used as an intermediate assign of rdesc->name, plus another strcmp. Since we already have rdesc->name, no need it anymore. Cc: Liam Girdwood Cc: Mark Brown Cc: Shawn Guo Cc: Sascha Hauer Cc: Robin Gong Signed-off-by: Dong Aisheng --- drivers/regulator/anatop-regulator.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index 9481730..19eb1f4 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c @@ -39,7 +39,6 @@ #define LDO_FET_FULL_ON 0x1f struct anatop_regulator { - const char *name; u32 control_reg; struct regmap *anatop; int vol_bit_shift; @@ -194,12 +193,12 @@ static int anatop_regulator_probe(struct platform_device *pdev) if (!sreg) return -ENOMEM; - of_property_read_string(np, "regulator-name", &sreg->name); rdesc = &sreg->rdesc; - rdesc->name = sreg->name; rdesc->type = REGULATOR_VOLTAGE; rdesc->owner = THIS_MODULE; + of_property_read_string(np, "regulator-name", &rdesc->name); + initdata = of_get_regulator_init_data(dev, np, rdesc); if (!initdata) return -ENOMEM; @@ -299,7 +298,7 @@ static int anatop_regulator_probe(struct platform_device *pdev) * a sane default until imx6-cpufreq was probed and changes the * voltage to the correct value. In this case we set 1.25V. */ - if (!sreg->sel && !strcmp(sreg->name, "vddpu")) + if (!sreg->sel && !strcmp(rdesc->name, "vddpu")) sreg->sel = 22; if (!sreg->bypass && !sreg->sel) { -- 2.7.4