From patchwork Wed Jul 15 17:52:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Link Mauve X-Patchwork-Id: 2668 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id D59C31C09D6 for ; Wed, 15 Jul 2026 19:57:54 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-24449-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-24449-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 7A93C3038143 for ; Wed, 15 Jul 2026 17:53:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B54664A33ED; Wed, 15 Jul 2026 17:53:25 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from luna.linkmauve.fr (82-65-109-163.subs.proxad.net [82.65.109.163]) (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 636A048C8B2; Wed, 15 Jul 2026 17:53:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.65.109.163 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784138005; cv=none; b=e2E4zvD4zpdYxpNuyY2krZcLuJm/P8o3D6WYWMLJBPlFosqqbnTX8PWIN2jGEh0tAB/ZFWtmhsPTXmmihaigPtXzEU6WrB9G8z9ODYktlur1S1MHy1ID4jnD5qI538YM/icRURkQSjD1t5BoUZiFbD6xcxkKnoVHhsjRVedLgt0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784138005; c=relaxed/simple; bh=HmDTdeFmXUNekb42xkLm8wMIQvrqoYDvHiyd1yd1CY0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KFoOYJjkdfRseINvZi+Zz1JDiRbvWfEg9a/v7PgQf7OLgmHBfijwSvHBcUJbLinNL81xGVjCvSnBDuYXLZaCniW7rIxJKN1uqmvTlKhpPnQD5uuNzcQyGffOTDsPipVqgVikdH15k8e0qPVxUy4CjOmNjdVVkB0mU/9sSgyQKts= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linkmauve.fr; spf=pass smtp.mailfrom=linkmauve.fr; arc=none smtp.client-ip=82.65.109.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linkmauve.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linkmauve.fr Received: by luna.linkmauve.fr (Postfix, from userid 1000) id 8AFA9F40D25; Wed, 15 Jul 2026 19:52:52 +0200 (CEST) From: Link Mauve To: Srinivas Kandagatla Cc: Link Mauve , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Sakari Ailus , Tianshu Qiu , Bingbu Cao , Mauro Carvalho Chehab , Aaro Koskinen , Andreas Kemnade , Roger Quadros , Tony Lindgren , Lee Jones , Arnd Bergmann , Greg Kroah-Hartman , Bartosz Golaszewski , "Vaibhaav Ram T.L" , Kumaravel Thiagarajan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Vladimir Zapolskiy , =?utf-8?q?Andr=C3=A9_Draszik?= , Orson Zhai , Baolin Wang , Chunyan Zhang , Maxime Coquelin , Alexandre Torgue , Praveen Teja Kundanala , Kalyani Akula , Michal Simek , Alexandre Belloni , Joshua Kinard , Antoniu Miclaus , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Miguel Ojeda , Boqun Feng , Gary Guo , =?utf-8?q?Bj?= =?utf-8?q?=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , =?utf-8?q?Onur_=C3=96zkan?= , Daniel Lezcano , Johan Hovold , Ronald Claveau , Salah Triki , Yury Norov , David Carlier , Achim Gratz , Alexander Sverdlin , Patrick Wicki , Markus Heidelberg , Markus Perkins , =?utf-8?q?Uwe_Kleine-K=C3=B6nig_=28?= =?utf-8?q?The_Capable_Hub=29?= , Bjorn Helgaas , Abd-Alrhman Masalkhi , Chen Ni , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, mfd@lists.linux.dev, linux-i2c@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-rtc@vger.kernel.org, linux-sunxi@lists.linux.dev, rust-for-linux@vger.kernel.org Subject: [PATCH 7/8] mfd: twl-core: make reg_write callback take const void * Date: Wed, 15 Jul 2026 19:52:23 +0200 Message-ID: <20260715175229.24672-8-linkmauve@linkmauve.fr> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260715175229.24672-1-linkmauve@linkmauve.fr> References: <20260715175229.24672-1-linkmauve@linkmauve.fr> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= The previous commit switched from a pointer to mutable data to a pointer to immutable data, so let’s fix all users of the nvmem_config API. Signed-off-by: Link Mauve --- drivers/mfd/twl-core.c | 2 +- include/linux/mfd/twl.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index c024a28b057e..d7e3ab41717b 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -447,7 +447,7 @@ static struct regmap *twl_get_regmap(u8 mod_no) * * Returns 0 on success or else a negative error code. */ -int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes) +int twl_i2c_write(u8 mod_no, const u8 *value, u8 reg, unsigned num_bytes) { struct regmap *regmap = twl_get_regmap(mod_no); int ret; diff --git a/include/linux/mfd/twl.h b/include/linux/mfd/twl.h index b31e07fa4d51..131451d70960 100644 --- a/include/linux/mfd/twl.h +++ b/include/linux/mfd/twl.h @@ -168,7 +168,7 @@ int twl_set_regcache_bypass(u8 mod_no, bool enable); /* * Read and write several 8-bit registers at once. */ -int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); +int twl_i2c_write(u8 mod_no, const u8 *value, u8 reg, unsigned num_bytes); int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); /* @@ -186,7 +186,7 @@ static inline int twl_i2c_write_u16(u8 mod_no, u16 val, u8 reg) { __le16 value; value = cpu_to_le16(val); - return twl_i2c_write(mod_no, (u8 *) &value, reg, 2); + return twl_i2c_write(mod_no, (const u8 *) &value, reg, 2); } static inline int twl_i2c_read_u16(u8 mod_no, u16 *val, u8 reg) {