From nobody Mon Sep 29 22:46:58 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75928C00140 for ; Tue, 16 Aug 2022 00:18:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350754AbiHPASE (ORCPT ); Mon, 15 Aug 2022 20:18:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353011AbiHPAJr (ORCPT ); Mon, 15 Aug 2022 20:09:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F5191741AD; Mon, 15 Aug 2022 13:29:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5AD23B80EA8; Mon, 15 Aug 2022 20:29:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86193C433D7; Mon, 15 Aug 2022 20:29:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595359; bh=bOmIgRM4vNz3Df9Jf/OuuxejBYT6qZkU/b0bYL8I7/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dZDrizdnsMRErkxuhlQw0CwwYrpPDXuMOcQ44meTBOh6RwC66CxnyvTCiD9OZLa1S a/LaPxGW2eO9wEghn65PtFz2xRxKi2cZoxMtBIlntSaqCm4DL0ulLlN0aIiUcEX9TQ bppow7XYtdf0Hc9rhxZogj+eX9EDP3BbhCMvVOU8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Brown , Miquel Raynal , Sasha Levin Subject: [PATCH 5.19 0740/1157] mtd: dataflash: Add SPI ID table Date: Mon, 15 Aug 2022 20:01:36 +0200 Message-Id: <20220815180509.082055892@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Mark Brown [ Upstream commit ac4f83482afbfd927d0fe118151b747cf175e724 ] Currently autoloading for SPI devices does not use the DT ID table, it uses SPI modalises. Supporting OF modalises is going to be difficult if not impractical, an attempt was made but has been reverted, so ensure that module autoloading works for this driver by adding an id_table listing the SPI IDs for everything. Fixes: 96c8395e2166 ("spi: Revert modalias changes") Signed-off-by: Mark Brown Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220620152313.708768-1-broonie@ker= nel.org Signed-off-by: Sasha Levin --- drivers/mtd/devices/mtd_dataflash.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_= dataflash.c index 134e27328597..25bad4318305 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c @@ -112,6 +112,13 @@ static const struct of_device_id dataflash_dt_ids[] = =3D { MODULE_DEVICE_TABLE(of, dataflash_dt_ids); #endif =20 +static const struct spi_device_id dataflash_spi_ids[] =3D { + { .name =3D "at45", }, + { .name =3D "dataflash", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(spi, dataflash_spi_ids); + /* .......................................................................= .. */ =20 /* @@ -936,6 +943,7 @@ static struct spi_driver dataflash_driver =3D { =20 .probe =3D dataflash_probe, .remove =3D dataflash_remove, + .id_table =3D dataflash_spi_ids, =20 /* FIXME: investigate suspend and resume... */ }; --=20 2.35.1