From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F8574F4D1B; Tue, 13 Oct 2026 12:47:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791895621; cv=none; b=eXttguChKmUsvBtrDmcvtvVOCQAcWFb5R7VCMPgysBVQiVcZX7C8nl7vcsqYX/1uNbvWMithxw9P6s2IYoA4ZjndEdzh1xj3Jvoj59Cs0a/lwEU62TGeD3kqQaZV3SC2CA9NHA4qgjOuVbB7qN+HWxLuk5L/6xXnSi9fvmQgl2E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791895621; c=relaxed/simple; bh=zBOSXyKZe+NeuHye2d5Il6YFdmk/Y3kWH4phLCR04NE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PI3GsexcDZG1e8mfZIOYR1wtSCnFV5tbKOnwuTrA/SoMcTG8jMDu9Kc6ca1vCV17q3Df8TzbqJZ2wMRBRcQ0SITysY5ifzhLsjl2jcS8vZWqbhUjvc/AL94O3sNOFt9wddtXFiZHoxZtVMT5wvZ4sS0OMM8W/9rO9E0MWRLisck= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wg18vYSh; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="wg18vYSh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 996561F0089A; Tue, 13 Oct 2026 12:46:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791895620; bh=7nra358RGlclrOpM2xyHoUaRl7whwHDQt2t6eHmI/Zw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wg18vYShoAzBtaIIEwXWHzvqBJ27WvB0b67tySOZLa1sn//N3eShosXoSbEzf/jPN 3NwEMXxKfQfnkvqy+3S1DTMBM8g1EhT5u1imVe2m037mtP9UAs3dsecZF3o0WSnX3o 3zid5cjONdFF+h4+TFWVVgPadfNZxDODja8RH/l4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Pengpeng Hou , Jonathan Cameron , Sasha Levin Subject: [PATCH 6.12 337/497] iio: cdc: ad7150: fix OF matching and publish module aliases Date: Tue, 13 Oct 2026 13:38:24 +0200 Message-ID: <20261013112915.904142058@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261013112907.864180619@linuxfoundation.org> References: <20261013112907.864180619@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pengpeng Hou [ Upstream commit 52da294027f53e7084c18dd4b4f73354a40382f3 ] The OF match entries use positional initializers, which initialize the name field rather than compatible. Consequently the advertised AD7150, AD7151 and AD7156 compatible strings do not describe OF compatible matches. The table is also not exported for module alias generation. Use designated compatible initializers and publish the OF table. Keep the existing I2C ID table and its device-variant selection unchanged. The issue was found by our static-analysis tool. Fixes: 89f2d5b080bc ("staging:iio:cdc:ad7150: Add of_match_table") Assisted-by: LLM Cc: stable@vger.kernel.org Signed-off-by: Pengpeng Hou Signed-off-by: Jonathan Cameron [ sashal: Retained the existing `{}` table terminator formatting instead of upstream’s `{ }`. ] Signed-off-by: Sasha Levin --- drivers/iio/cdc/ad7150.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/iio/cdc/ad7150.c b/drivers/iio/cdc/ad7150.c index 4c03b9e834b88..0417dffd350a2 100644 --- a/drivers/iio/cdc/ad7150.c +++ b/drivers/iio/cdc/ad7150.c @@ -637,11 +637,13 @@ static const struct i2c_device_id ad7150_id[] = { MODULE_DEVICE_TABLE(i2c, ad7150_id); static const struct of_device_id ad7150_of_match[] = { - { "adi,ad7150" }, - { "adi,ad7151" }, - { "adi,ad7156" }, + { .compatible = "adi,ad7150" }, + { .compatible = "adi,ad7151" }, + { .compatible = "adi,ad7156" }, {} }; +MODULE_DEVICE_TABLE(of, ad7150_of_match); + static struct i2c_driver ad7150_driver = { .driver = { .name = "ad7150", -- 2.53.0