Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp497239img; Wed, 20 Mar 2019 05:12:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzi8FeXG2eW3u4V5FT1FmQCeiWSSTFieqG3TWY7lwhZ3XzQHC2tsWkPt4uwIoOLD79Bsyan X-Received: by 2002:a17:902:8609:: with SMTP id f9mr7663774plo.85.1553083974184; Wed, 20 Mar 2019 05:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553083974; cv=none; d=google.com; s=arc-20160816; b=ZGpoFDEN0XWxoTVpn3cJxJsYOexuLItL9dDf1D/HQC5vouravUmkhyUk985VXHsKu8 6FW+dZXm8ASFvuB/vq+HZaDysidsx5EGUmvz1jiyIBFazBrdJOgU6TVKe7ZlpTAqeSzd uQjbxEHJYoyBTfDdg8rfyhZ2sQKMuahlTRuuYFshfcBVQDiSrl97aIZad3uvZ2e3GWgO vH+7xYrKqw8FnZvascwRISMf02Iq/n+F0fx5kzd02spaVxptf57tsImvsK0Z0Q40rVSK 7iBJr96+1pS26ecq2m0wqbdApzlVmd9lpCtBNoeEg2+Sk68V4Qx9REqw0MWKbjKS0SPy a+hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=JO0hRtirnbvAuYdx+9sUZT6fK1EoSxICeBDSVE6GYxM=; b=KItkJqXjBD0Vp076oOuV6H8btGiktR8MBrLDugdkZWJsPrSDIvSPLW3xQq80dL2+dG agSg1hej2OiqxLamuNwwu+Z811G6H9NRiGVuZzydm34d6Wqw/8VzhCOY6rW549YevLe9 QcuZP3F/Pczhnuo+BieTqWc4L/TbZhR9yoS8wxYQM7N9BsZkuulp7W9ZNORQwMD/M9nJ 5Ebn5kkBnzYAosMmlzD0TeSlzjiuWhRjiimlmFOvHziFU3uUK4ODAZDDGaNtervyohhM TO5cnR9c4eDGCw13jcZcuSuFTP5aT9Pnwtocs/THX2/BiialSVKO8o6Ou9nq4dJ9WZNE S9vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ingics-com.20150623.gappssmtp.com header.s=20150623 header.b=LlyhXyvL; 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 l39si1823349plb.143.2019.03.20.05.12.38; Wed, 20 Mar 2019 05:12:54 -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=pass header.i=@ingics-com.20150623.gappssmtp.com header.s=20150623 header.b=LlyhXyvL; 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 S1727528AbfCTMLJ (ORCPT + 99 others); Wed, 20 Mar 2019 08:11:09 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:45392 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726366AbfCTMLJ (ORCPT ); Wed, 20 Mar 2019 08:11:09 -0400 Received: by mail-pf1-f193.google.com with SMTP id v21so1780811pfm.12 for ; Wed, 20 Mar 2019 05:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ingics-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=JO0hRtirnbvAuYdx+9sUZT6fK1EoSxICeBDSVE6GYxM=; b=LlyhXyvLeRTjzqFsZBwwgqDH0XWjjULMpMGaX1Upp2NtS5m0nksY9ojY9B7XYgjgVq Loy72R9AasKPC7RnqkQoJGj1nhvwJijwXBRx7wu/UaIU0SCnQZ/2qNezxLpSxI/I29If aqqDvaotELYZO06NB6kekIlT9X7RPaOdqHbGWydnZOJDM0WjN7SUGKvDbvfNheq4dxto ZJp8ijLL3hD2e0HaUAOvqcO4o5nqtUruGqsaOvDxCtDNhAUg6FRcoyJ9SFQkqqOPYkVJ Uxh9dTcGY2FSkgQA8TiLNEaMM1TvE7nfPHVSobVhMknm6K3rcK3dzfWYKeYqUJZh+rPm kaYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JO0hRtirnbvAuYdx+9sUZT6fK1EoSxICeBDSVE6GYxM=; b=Vutbz8o8THYJFWnP+I4tQYWid0rajdINP3B4j8pEr0jblpkM+LBCcmdYDnMHU7D6HV rEJ1A+Wlj4nAoO2hvQRDTdE6C2BVO2g2EKJbmG5U+GHrkLbeq05H5Hzgh2FYzO5LlJSx STmtL6x+AVNoizdudDihzZKmBGw+Xpu/YA6TEJeLGh7AfxR4ORRzMDdT++1Kx0OrUcMA t/ZoAghSuM/Ye7P4pa2rLl6LYVGfHTA3kKQKMbQerqOjD/TJIYR7oJFG0J9WkRuQeN9h hibXz7ON18MBA3j6XkkLJBd2bNTk8WZSEqIdXsVZkG/H0l66CBJ4Rrq14/n3dH5ugo9g krEQ== X-Gm-Message-State: APjAAAV61MsBpV3NDAXtKeadD8fXoZdfRXjSEJndoQdd4CqhJdm9jGAt e7ZmaTrmCY7jGzIGlSrf5ibf3Q== X-Received: by 2002:a17:902:1101:: with SMTP id d1mr7396376pla.19.1553083868536; Wed, 20 Mar 2019 05:11:08 -0700 (PDT) Received: from localhost.localdomain (118-171-142-96.dynamic-ip.hinet.net. [118.171.142.96]) by smtp.gmail.com with ESMTPSA id 184sm2729937pff.149.2019.03.20.05.11.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Mar 2019 05:11:07 -0700 (PDT) From: Axel Lin To: Mark Brown Cc: Leonard Crestez , Pierre-Hugues Husson , Stefan Agner , Beniamino Galvani , Liam Girdwood , linux-kernel@vger.kernel.org, Axel Lin Subject: [PATCH] regulator: rn5t618: Constify regulator_desc Date: Wed, 20 Mar 2019 20:10:57 +0800 Message-Id: <20190320121057.31167-1-axel.lin@ingics.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The regulator_desc never need to be modified, so define them as const as a hint to the compiler that they can go into .rodata. Signed-off-by: Axel Lin --- drivers/regulator/rn5t618-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/rn5t618-regulator.c b/drivers/regulator/rn5t618-regulator.c index 790a4a73ea2c..a79c0c43b9f8 100644 --- a/drivers/regulator/rn5t618-regulator.c +++ b/drivers/regulator/rn5t618-regulator.c @@ -46,7 +46,7 @@ static const struct regulator_ops rn5t618_reg_ops = { .vsel_mask = (vmask), \ } -static struct regulator_desc rn5t567_regulators[] = { +static const struct regulator_desc rn5t567_regulators[] = { /* DCDC */ REG(DCDC1, DC1CTL, BIT(0), DC1DAC, 0xff, 600000, 3500000, 12500), REG(DCDC2, DC2CTL, BIT(0), DC2DAC, 0xff, 600000, 3500000, 12500), @@ -63,7 +63,7 @@ static struct regulator_desc rn5t567_regulators[] = { REG(LDORTC2, LDOEN2, BIT(5), LDORTC2DAC, 0x7f, 900000, 3500000, 25000), }; -static struct regulator_desc rn5t618_regulators[] = { +static const struct regulator_desc rn5t618_regulators[] = { /* DCDC */ REG(DCDC1, DC1CTL, BIT(0), DC1DAC, 0xff, 600000, 3500000, 12500), REG(DCDC2, DC2CTL, BIT(0), DC2DAC, 0xff, 600000, 3500000, 12500), @@ -79,7 +79,7 @@ static struct regulator_desc rn5t618_regulators[] = { REG(LDORTC2, LDOEN2, BIT(5), LDORTC2DAC, 0x7f, 900000, 3500000, 25000), }; -static struct regulator_desc rc5t619_regulators[] = { +static const struct regulator_desc rc5t619_regulators[] = { /* DCDC */ REG(DCDC1, DC1CTL, BIT(0), DC1DAC, 0xff, 600000, 3500000, 12500), REG(DCDC2, DC2CTL, BIT(0), DC2DAC, 0xff, 600000, 3500000, 12500), @@ -107,7 +107,7 @@ static int rn5t618_regulator_probe(struct platform_device *pdev) struct rn5t618 *rn5t618 = dev_get_drvdata(pdev->dev.parent); struct regulator_config config = { }; struct regulator_dev *rdev; - struct regulator_desc *regulators; + const struct regulator_desc *regulators; int i; int num_regulators = 0; -- 2.17.1