Message ID | 20240704-mfd-const-regmap_config-v2-19-0c8785b1331d@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2FCCC3271F for <linux-arm-kernel@archiver.kernel.org>; Thu, 4 Jul 2024 17:27:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Qd0Z+TzoGuFE1UpjnOMV6kYTwv4UPS1xus6pH0CzaYg=; b=AfBHBOjKhjKsbEzlw5ZQTa6u8t NYC0lE6v4rJM6U7w4AR2S0+H+7wv+MbTowaf+zJskH9O7UK8AhPTG941d8bRyJ5HQ70Lux4mwnAkO 17oB5QKBjuDz3NtRIA72SEwuTbA6tDoRbSNDdf4Ijb4mjWSlQLolAbt5NmJbBAdGNkP01SoqOnBkW GrzNwMKiLb1q0sGyZFSOTsRFox4DGgNGndaw17JpVDWdhZUOPFwJYJU+w6PqbQDa3Fi+ucsN3GImO mWeYgVdnGgKBSNVg+LWZ27u95FIMEki9Ml8IdF47m6wz1t/Dl7+MhLSsNoQ/ETNtDe88JnCoQAi/X CAKTI0xA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPQEk-0000000E06K-2Cix; Thu, 04 Jul 2024 17:27:14 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPQBd-0000000DyYG-0pxs for linux-arm-kernel@lists.infradead.org; Thu, 04 Jul 2024 17:24:02 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4256aee6d4fso5194815e9.3 for <linux-arm-kernel@lists.infradead.org>; Thu, 04 Jul 2024 10:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720113840; x=1720718640; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Qd0Z+TzoGuFE1UpjnOMV6kYTwv4UPS1xus6pH0CzaYg=; b=L6cwlmeIvc8oB4WINXC/diMYwAyuKqUg3de3KGyjg5n5ayTXADbbxxmig01aWW+WXL EwgCyMDKXtUnFRS1H7HdRnc61r772rbsIq9G+gvxnJUfptVmwRvSCpCIllRHpYr7lR84 GGhxh3HUrcCjETNERaP8PIVF4d07fUQuIef0BYF9bizlRAaEeSusGYJPHIEcq7P7O+Bg lOGPAJaRbxXbLrKm+N6S/Bb9VY+4hI8op5PeZr4kuyuVpQYwSXH42MS8QbruIWNWkhpR Q20Bl31PRdPgIWGTNaltbIkVuknp5bOxI9DRmtHHMXaSYJubRaff79WA1RP4DXbAPxtp nOLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720113840; x=1720718640; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qd0Z+TzoGuFE1UpjnOMV6kYTwv4UPS1xus6pH0CzaYg=; b=K6bvXN3OsmMEwkY0cUQrz+j9IHr9WvAyojYmBD+ih+P5cHUov0wz0/HvaRghE2ZyBP LwLwp9gt0mMp+tkdOsvquH5WhguaCfqRH3idGr5IkaEYaRZ53kpLqQMXktxafwwGyKHY IBAT1C7IX/2PKynhWexBXM53VL8ZgS/CmnWF3DXjccVJ3VeTFwV1c0UIl6bEDfg7A2sS tfzUewXGW9Bu/DoSOa0azmgtKw4PHd92i+bvKrFoCSgrxVbx4p5ngw2dhUjd5AeO2ZQy g2nJXtnv9vQ6Ztq7Jaw6rOqfDJ4bRCVxYry+kQ+n6BEhI2RS2IavXZLdHx/VLxSAUO9s PukA== X-Forwarded-Encrypted: i=1; AJvYcCUKpN+Nf6rGVFvP/6iTsMVrCz4pzDtEA+tDayyLtR6GpaStKrMdT0Vp3DyitbpZiHyrqCJuSl2tcaGOd/r62XKT5j+jEovSEs/SDQED+NxFFsQZHMM= X-Gm-Message-State: AOJu0YyAeJe7Wi9QNd3ekcyFQFY+1J57WY5AVNSiDB6tBbgJWbspA1CR 7BmFNIvZVCqerDTVGqcT6ULCXM17iZsxfvEouKX5lGh2dice+pDD X-Google-Smtp-Source: AGHT+IGYWITQkdRhz4qv8j9cI3alOIpaga9mU5l0rkDSHKoFzkIRNkCv3e6d3tLaPXkedXobbHSgCg== X-Received: by 2002:a7b:cc90:0:b0:425:6510:d8ec with SMTP id 5b1f17b1804b1-4264a3dc1f4mr17296225e9.23.1720113839773; Thu, 04 Jul 2024 10:23:59 -0700 (PDT) Received: from [127.0.1.1] (84-115-213-37.cable.dynamic.surfer.at. [84.115.213.37]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4264a1d6133sm32330965e9.13.2024.07.04.10.23.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jul 2024 10:23:59 -0700 (PDT) From: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Thu, 04 Jul 2024 19:23:29 +0200 Subject: [PATCH v2 19/24] mfd: tps65910: Constify struct regmap_irq_chip MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240704-mfd-const-regmap_config-v2-19-0c8785b1331d@gmail.com> References: <20240704-mfd-const-regmap_config-v2-0-0c8785b1331d@gmail.com> In-Reply-To: <20240704-mfd-const-regmap_config-v2-0-0c8785b1331d@gmail.com> To: Support Opensource <support.opensource@diasemi.com>, Lee Jones <lee@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, Matti Vaittinen <mazziesaccount@gmail.com>, Xu Yilun <yilun.xu@intel.com>, Tom Rix <trix@redhat.com>, Marek Vasut <marek.vasut+renesas@gmail.com>, Andy Shevchenko <andy@kernel.org>, Tony Lindgren <tony@atomide.com>, Tim Harvey <tharvey@gateworks.com>, Orson Zhai <orsonzhai@gmail.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, Chunyan Zhang <zhang.lyra@gmail.com> Cc: linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-omap@vger.kernel.org, Javier Carrasco <javier.carrasco.cruz@gmail.com> X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1720113803; l=1513; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=1DZ6ZNTYVH+qxDLzyvoRZYeRzU6/uB98HyF0NhspnHM=; b=dPK+o8VSAHe74YFtYLhnBDMc4W755tD/h2MKv55jyOcgXfOx3RXMh2qTQTj258fzb6Genb0cq ujDkD/Nm7osDku+mrsg06AsIyvM2N44JYz8j9yIOK+zo4qzqPunMjZP X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240704_102401_286702_1EDD2A28 X-CRM114-Status: GOOD ( 13.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
mfd: Constify read-only regmap structs
|
expand
|
diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c index 8fb0384d5a8e..6a7b7a697fb7 100644 --- a/drivers/mfd/tps65910.c +++ b/drivers/mfd/tps65910.c @@ -197,7 +197,7 @@ static const struct regmap_irq tps65910_irqs[] = { }, }; -static struct regmap_irq_chip tps65911_irq_chip = { +static const struct regmap_irq_chip tps65911_irq_chip = { .name = "tps65910", .irqs = tps65911_irqs, .num_irqs = ARRAY_SIZE(tps65911_irqs), @@ -208,7 +208,7 @@ static struct regmap_irq_chip tps65911_irq_chip = { .ack_base = TPS65910_INT_STS, }; -static struct regmap_irq_chip tps65910_irq_chip = { +static const struct regmap_irq_chip tps65910_irq_chip = { .name = "tps65910", .irqs = tps65910_irqs, .num_irqs = ARRAY_SIZE(tps65910_irqs), @@ -223,7 +223,7 @@ static int tps65910_irq_init(struct tps65910 *tps65910, int irq, struct tps65910_platform_data *pdata) { int ret; - static struct regmap_irq_chip *tps6591x_irqs_chip; + static const struct regmap_irq_chip *tps6591x_irqs_chip; if (!irq) { dev_warn(tps65910->dev, "No interrupt support, no core IRQ\n");
`tps65910_irq_chip` and `tps65911_irq_chip` are not modified and can be declared as const to move their data to a read-only section. The pointer used to reference those structs has also been converted to const. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> --- drivers/mfd/tps65910.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)