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 EE58DC61DA4 for ; Mon, 13 Mar 2023 10:58:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230114AbjCMK64 (ORCPT ); Mon, 13 Mar 2023 06:58:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbjCMK6r (ORCPT ); Mon, 13 Mar 2023 06:58:47 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E744625962 for ; Mon, 13 Mar 2023 03:58:42 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed50:7ed1:e2c6:b94:264a]) by baptiste.telenet-ops.be with bizsmtp id Xmyg2900B01Vtj801mygzf; Mon, 13 Mar 2023 11:58:40 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1pbfsQ-00C3II-I2; Mon, 13 Mar 2023 11:58:40 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1pbft1-008cWx-Ve; Mon, 13 Mar 2023 11:58:39 +0100 From: Geert Uytterhoeven To: Mark Brown , Min Li , Lee Jones , Vladimir Oltean , Amit Kumar Mahapatra , Michal Simek Cc: linux-spi@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 6/6] spi: sh-msiof: Remove casts to drop constness Date: Mon, 13 Mar 2023 11:58:38 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now the chip select APIs take const pointers, there is no longer a need to cast away constness. Fixes: 9e264f3f85a56cc1 ("spi: Replace all spi->chip_select and spi->cs_gpiod references with function call") Signed-off-by: Geert Uytterhoeven --- drivers/spi/spi-sh-msiof.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index 50498c4eb661d09f..55dfe2fd89c8ba4c 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c @@ -587,11 +587,11 @@ static int sh_msiof_prepare_message(struct spi_controller *ctlr, u32 ss, cs_high; /* Configure pins before asserting CS */ - if (spi_get_csgpiod((struct spi_device *)spi, 0)) { + if (spi_get_csgpiod(spi, 0)) { ss = ctlr->unused_native_cs; cs_high = p->native_cs_high; } else { - ss = spi_get_chipselect((struct spi_device *)spi, 0); + ss = spi_get_chipselect(spi, 0); cs_high = !!(spi->mode & SPI_CS_HIGH); } sh_msiof_spi_set_pin_regs(p, ss, !!(spi->mode & SPI_CPOL), -- 2.34.1