From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 01CFAC6FD19 for ; Fri, 10 Mar 2023 21:58:45 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4PYKgm2QjGz3fd9 for ; Sat, 11 Mar 2023 08:58:44 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=VCdj2ugv; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=amd.com (client-ip=2a01:111:f400:7e8a::613; helo=nam10-bn7-obe.outbound.protection.outlook.com; envelope-from=amit.kumar-mahapatra@amd.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=VCdj2ugv; dkim-atps=neutral Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on20613.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8a::613]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4PYCqw0VNGz3cBF; Sat, 11 Mar 2023 04:35:22 +1100 (AEDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aanLT9ZFyPF0DDqLmeuL5c/vsUTAGsCQ3ZjoxPyse5CGNgpWY1fiAAjKliqoQ/6TrrCEq2jIcZ0BHZwf+o8a7yq/o0mVjuhhNw4DEvlts1aTH9pnYCfkcr/CvHZBcCXIu1AH7zTUNdh63xR/LyjRBfkw+oSMGEmP/beM3NAb4UiKRSdCAHqvX4+txixXULnuhkcko2RVRrYQFGEa1eCUft3YzLuG2av0030S9TwcrxqUJgYwcHb5D/hAlx0rYM2PVVXBipS/zHLvJv3i0q1rA9z8NHp0yYH3MCs4qkO/4ewuU4bfA612BwohsKCmSxpZ7Lq8UQ1ExwA6bvO6tVZ7lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=u0SjpM/Jdk6oe9dWyUvfwsJIXdYePKsDAv1sJ/FnmC8=; b=JyacWG5WtzaPNa5hoA0hONjTIO78vXfhwmhq+tpLzslDPv5KsKNrg6MIgJQFDHdd0tpuR+QkARQQd9OEmsaCFFi0e7lKB2iWm000i7bOLlTv0WVoLmX/leGg/37khxRPHUqJxCE9fMizfoASjQCkGgaWHcMiRUu08yYTY0XJ7+dL+0WOTwWOrXgeyL9SqSFWYJeIlM3NQvUxoEmMEQcji9UT7u36TqwGo6zVtUAT+L8nOkYERa3juCHAE3zsZ7LUHZJN3KtYfDBviiL4WnqU2gjg8eJRMQsADrSF6Ns3GP65Y5oF8THHIm1obIM6Oky/vJVFhWgKNjEcHHf8adzshg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u0SjpM/Jdk6oe9dWyUvfwsJIXdYePKsDAv1sJ/FnmC8=; b=VCdj2ugvSmUu9IJxoKaKFzgXsZBhpz+LLKzsyO8nHJPUd67MZmoPWOlUATLPIHXO5+j6gF3IJQa87G2+rhrpSnz6I4+w/aO+gmMntfFY78q+P2QR7N8/KswEyqmdv0MCajO7frqWb12doDu+iadcx30yAIc9G/p855tRJUI6iAg= Received: from BN1PR10CA0027.namprd10.prod.outlook.com (2603:10b6:408:e0::32) by MN0PR12MB5978.namprd12.prod.outlook.com (2603:10b6:208:37d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Fri, 10 Mar 2023 17:35:02 +0000 Received: from BN8NAM11FT116.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e0:cafe::44) by BN1PR10CA0027.outlook.office365.com (2603:10b6:408:e0::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.20 via Frontend Transport; Fri, 10 Mar 2023 17:35:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by BN8NAM11FT116.mail.protection.outlook.com (10.13.176.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.21 via Frontend Transport; Fri, 10 Mar 2023 17:35:02 +0000 Received: from SATLEXMB07.amd.com (10.181.41.45) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 10 Mar 2023 11:35:01 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 10 Mar 2023 09:35:00 -0800 Received: from xhdsneeli40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Fri, 10 Mar 2023 11:34:34 -0600 From: Amit Kumar Mahapatra To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH V6 04/15] mtd: devices: Replace all spi->chip_select and spi->cs_gpiod references with function call Date: Fri, 10 Mar 2023 23:02:06 +0530 Message-ID: <20230310173217.3429788-5-amit.kumar-mahapatra@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230310173217.3429788-1-amit.kumar-mahapatra@amd.com> References: <20230310173217.3429788-1-amit.kumar-mahapatra@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT116:EE_|MN0PR12MB5978:EE_ X-MS-Office365-Filtering-Correlation-Id: e8a39af0-74f8-46ad-0166-08db218dc75a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xUo5uxVLV/Gkgn5tSJnXpvfgI4bFJyRIlwHXRA1t5VMN0fYyIIN7b3nkSQcayiKIttv5+dT72BT19z4z1yGHCL1hhoJzPK7DQskIewn6iGTOQecmoJe1rSGWd3Z//7JHk0nqogqaxjj3+Sl3xkASiteyKc0TZL9aZcnPHuAO5jofaqhZjr/jKbYoj3pkoUrEWzlmyaCHUJicch7fB+94cYIxZfMf6dtBPpviZn/lygCu325qZHvhPogTV/51T771gb51UvTSGJJ5ELcy83SD16XKZSqWCHWsssUFjNi62KWQeFrieN9vaRyyOPm5X0OcntCUc6c3DKkq0jG1wmRVk5wZZ0z6IVNKyc5J6IZ4xIqYrNrZx8FYXI4OseC70k0azP7AAYNMXd5xO9xX2PxnMfYN+iLTJFh7FkicG993tzvCEPQE86Y75Ph3dlPowyexKVlZ66CMYy47qJNmF7CBZaA67Ose4APLnR8+lu9A/g7TsQl0I0wXhmaOKLlcFa4P0/kLzw5ji9sC+t2t7CY8q55P7jQumx6B6/Tj9UOgU/kGXKCMLsWhIGnXae5F3DVvQf3DZJlzHdBKC3JL5kCK5y2mLUr8x/3viLPc8fbMp3nUwIm3VL+/18bAzJ6cfnz1/OmwrfpRdI//5c0UdLcR/5We9eBO3TGU7jZUBKnoT7uO/K70t4BwmorP5fPKPAosAFh3GOnDxlr+c4AtitrxeaI7ABkARABvA4ImB+xym5WFMu0dxp5avkmgqsX7+oaceC/b/04OCPn/6ZNJYButBfwGSOWvCZRGJxSFIYjrEXr+2VfKOiwhDsRfnyTNppSyUBJ097nlNlTBihEkFrHvhrJXjNYmyvyOZNW1RKkXer8= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230025)(4636009)(396003)(376002)(346002)(39860400002)(136003)(451199018)(46966006)(36840700001)(40470700004)(336012)(47076005)(426003)(921005)(110136005)(186003)(40460700003)(36756003)(54906003)(81166007)(40480700001)(356005)(86362001)(36860700001)(1076003)(26005)(83380400001)(82310400005)(82740400003)(6666004)(7416002)(2616005)(1191002)(8936002)(2906002)(7276002)(5660300002)(316002)(7336002)(478600001)(70206006)(7366002)(7406005)(4326008)(41300700001)(8676002)(70586007)(36900700001)(83996005)(2101003)(41080700001)(84006005);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 17:35:02.0320 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e8a39af0-74f8-46ad-0166-08db218dc75a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT116.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5978 X-Mailman-Approved-At: Sat, 11 Mar 2023 08:54:20 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, tmaimon77@gmail.com, linux-aspeed@lists.ozlabs.org, linux-iio@vger.kernel.org, konrad.dybcio@somainline.org, alsa-devel@alsa-project.org, tali.perry1@gmail.com, ldewangan@nvidia.com, linux-mtd@lists.infradead.org, alim.akhtar@samsung.com, linux-riscv@lists.infradead.org, linux-spi@vger.kernel.org, festevam@gmail.com, linux-stm32@st-md-mailman.stormreply.com, jbrunet@baylibre.com, git@amd.com, linux-samsung-soc@vger.kernel.org, benjaminfair@google.com, yogeshgaur.83@gmail.com, openbmc@lists.ozlabs.org, jonathanh@nvidia.com, amit.kumar-mahapatra@amd.com, yuenn@google.com, bcm-kernel-feedback-list@broadcom.com, joel@jms.id.au, linux-rockchip@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-imx@nxp.com, amitrkcian2002@gmail.com, Michael.Hennerich@analog.com, martin.blumenstingl@googlemail.com, linux-arm-msm@vger.kernel.org, radu_nicolae.pirea@upb.ro, linuxppc-dev@lists.ozlabs.org, lars@metafoo.de, linux-mediatek@lists.infradead.org, linux-rpi-ker nel@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, michal.simek@amd.com, linux-arm-kernel@lists.infradead.org, avifishman70@gmail.com, venture@google.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, nicolas.ferre@microchip.com, fancer.lancer@gmail.com, linux-kernel@vger.kernel.org, andrew@aj.id.au, michael@walle.cc, thierry.reding@gmail.com, palmer@dabbelt.com, kernel@pengutronix.de, netdev@vger.kernel.org, patches@opensource.cirrus.com, linux-wpan@vger.kernel.org, claudiu.beznea@microchip.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select & spi->cs_gpiod and replaced all spi->chip_select and spi->cs_gpiod references with get or set API calls. While adding multi-cs support in further patches the chip_select & cs_gpiod members of the spi_device structure would be converted to arrays & the "idx" parameter of the APIs would be used as array index i.e., spi->chip_select[idx] & spi->cs_gpiod[idx] respectively. Signed-off-by: Amit Kumar Mahapatra Reviewed-by: Michal Simek --- drivers/mtd/devices/mtd_dataflash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 3bbaa590c768..1d3b2a94581f 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c @@ -639,7 +639,7 @@ static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages, /* name must be usable with cmdlinepart */ sprintf(priv->name, "spi%d.%d-%s", - spi->master->bus_num, spi->chip_select, + spi->master->bus_num, spi_get_chipselect(spi, 0), name); device = &priv->mtd; -- 2.25.1