From patchwork Thu Jul 4 17:23:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13724092 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04D271448C5 for ; Thu, 4 Jul 2024 17:23:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720113841; cv=none; b=c0Kj0ZBiM6GvNkZd3c5Y+KucA6PQ36PTp1T6AFJgYfyq8/WwgvaXmiEMNc4p5gjP4U9UzVq/OLByU/OIh7MWDmjGlGWqF/UXVVED2LoG+7OJWccsktNu2SGiA8PE7ZOeAWwFv7ks2XzHMo031Kfs1rGWUn0guvDN+bVGf3bn9UI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720113841; c=relaxed/simple; bh=l+Er6evvde/rWSFaUokuQlFg/GXNk47TTlB13TZUEts=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hpP02HFmMTBhRnVgguD0vKc1pkQufd6cqvVWYmMRDbDYKqPgKUCgA++fh+Z8KzDPwTEKt+HrpyUAarqamFdP9BdM2HHqYC/ToHtgHtrfi2o5A0avaWmYypQ54peuWT4dNNT1JXe64D7Sk41F65kfX9IIV//ZpLleFFr/oCeyJ/I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UsAY79OX; arc=none smtp.client-ip=209.85.208.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UsAY79OX" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2ee910d6a9dso4810391fa.1 for ; Thu, 04 Jul 2024 10:23:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720113838; x=1720718638; darn=lists.linux.dev; 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=dFEzSQ1m8GOHWdp6McPosgOTS/y1yxZo30lauWYmu3Y=; b=UsAY79OXueXe+XIQIWyeOh5+zyXdBrEGEqb56brnTvknceTvJogN4vHUql4QFcZqlx HSxpDzWtNDThFrdFYfOaGMe0Ch2T/m9z45z6Fx1YBF4rh4XHHt8UQ/eMuXu87PQgRMFK fbtlY+cS9oAeInLekZLiJBVW3VqdMb2GlV6aKDEGXbZ6hzew6JY03DzxAzIzjQJREPnp AZlyAI1nGApdMDx2O2kpXxRPcdWQb8wMuvxToGmgfw+R0X+EBeNTvL7aIsaLdAcBuvMW 77wS86kVAzWqM2V3iStdEeFIydWLRD5upWj229kIIl2Ik/njHLo9gbfwUkDtYTrOEx9+ BInQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720113838; x=1720718638; 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=dFEzSQ1m8GOHWdp6McPosgOTS/y1yxZo30lauWYmu3Y=; b=R/uiSpnrHTL0F/XNDKekvlK1D+ASYnSPJKkhDJ5I6Ns7Wh+geSwokhAVPhF37ivsBI brw/4d4YyVxFQJT19SWR9lmyrGy+zlyYQPoA1H9Ur3MCPFj3xNZMET4tXTNvuzIySZho i80PtGpoF9lIhMRd+Wt1eGp35r8sWPKd0vjl4UHxc6Sz293e/ZGfr9C+pLqywHX4yxgv LXVJtTdHvHqh2W3XjgZjMW4ZJTmeDN6WLrA4jJgR6msf5yyc0J79PkHXTRhEJ6bQ+Ipa J7pP/yW9rL1lVOUw4unMGx04etRA2C7Cq9ZHRtudlKyx+Gzye0lS7Szu8dzxGfXN1lNO xXAQ== X-Forwarded-Encrypted: i=1; AJvYcCVXr5ds4l9jmJTj50sFZVXubdxZco0gac7RRUO0+hSxx85b8/7OuBYa7cu9ikpTtRMnTZ+VLsJgdssTfSAn8sYsdvFQ X-Gm-Message-State: AOJu0Yx68Q+U2LPGeXYXTRfx7pGdPK6gntJGky4Q7+v1ScVPCnAZf2Qs WCoZT9hTMcAwDCe02x4nO/daYPVn7tfs8HZzWZTCbZwwuaUzyg3K X-Google-Smtp-Source: AGHT+IEi4A1FtaFdz12zIHvNWSEctZX7fNHrhjR6JqhPRCZIKCsxlbu+g4wGlHJlz0dlfvXy+GNHbw== X-Received: by 2002:a2e:2285:0:b0:2ec:3fb8:6a91 with SMTP id 38308e7fff4ca-2ee8ed8bd6dmr15779241fa.19.1720113838114; Thu, 04 Jul 2024 10:23:58 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jul 2024 10:23:57 -0700 (PDT) From: Javier Carrasco Date: Thu, 04 Jul 2024 19:23:28 +0200 Subject: [PATCH v2 18/24] mfd: tps65219: Constify read-only regmap structs Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240704-mfd-const-regmap_config-v2-18-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 , Lee Jones , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matti Vaittinen , Xu Yilun , Tom Rix , Marek Vasut , Andy Shevchenko , Tony Lindgren , Tim Harvey , Orson Zhai , Baolin Wang , Chunyan Zhang 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 X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1720113803; l=1399; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=l+Er6evvde/rWSFaUokuQlFg/GXNk47TTlB13TZUEts=; b=IB/UfVZPpJfxWBNjRq1HOL9KSAcIs7j71u1a0Eg+t5siatf02eWNOBO2ZelZtfySyA7nHVm0n xHWqVW50PWxARF6sB/K+ga4ov49Gw3AWaMJTC6Rq++jWZ2G7kfS0zez X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `tps65219_irqs` and `tps65219_irq_chip` are not modified and can be declared as const to move their data to a read-only section. Signed-off-by: Javier Carrasco --- drivers/mfd/tps65219.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c index 0e0c42e4fdfc..57ff5cb294a6 100644 --- a/drivers/mfd/tps65219.c +++ b/drivers/mfd/tps65219.c @@ -159,7 +159,7 @@ static struct regmap_irq_sub_irq_map tps65219_sub_irq_offsets[] = { #define TPS65219_REGMAP_IRQ_REG(int_name, register_position) \ REGMAP_IRQ_REG(int_name, register_position, int_name##_MASK) -static struct regmap_irq tps65219_irqs[] = { +static const struct regmap_irq tps65219_irqs[] = { TPS65219_REGMAP_IRQ_REG(TPS65219_INT_LDO3_SCG, TPS65219_REG_INT_LDO_3_4_POS), TPS65219_REGMAP_IRQ_REG(TPS65219_INT_LDO3_OC, TPS65219_REG_INT_LDO_3_4_POS), TPS65219_REGMAP_IRQ_REG(TPS65219_INT_LDO3_UV, TPS65219_REG_INT_LDO_3_4_POS), @@ -211,7 +211,7 @@ static struct regmap_irq tps65219_irqs[] = { TPS65219_REGMAP_IRQ_REG(TPS65219_INT_PB_RISING_EDGE_DETECT, TPS65219_REG_INT_PB_POS), }; -static struct regmap_irq_chip tps65219_irq_chip = { +static const struct regmap_irq_chip tps65219_irq_chip = { .name = "tps65219_irq", .main_status = TPS65219_REG_INT_SOURCE, .num_main_regs = 1,