From patchwork Wed Apr 3 17:06:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13616522 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 31E8BCD1288 for ; Wed, 3 Apr 2024 17:16:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2GkbjoHOdH2X1NkxUiKGEC5svLJ52m7veXrPdOSMJL8=; b=p9why4XuZxKNIo yGD2pPJGEQKXYaFA+/QbIJR7CY7Tned/UK5UOlRitJkte3BnZDsKmNcTyq24gZ9nKjH50zWPcfQtn o+Swwq+0vKnZoSHDrzcwrkQ4BiYzbjP4sf7UTUiXCQBP9hvqcf+AQGy8ACIrCv8xWBWAzpEGTi2Yf PiGviJUdru0jAUf7pgJOPy0WicbxCDWc6bInYNgLM0lAghptP4IrgIPrF1fsRQzJUcQy+OVZDQFmJ Oug/Gvl7pKOgD8/1b/3ei7ZFLgDQwG8umIfL1vt2gdXfjBagBeYN/+QdsgSqCt8EuBVjDsXYaqOuf tbtgmUve3Mud9hktj2sA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs4DW-0000000H885-0kZD; Wed, 03 Apr 2024 17:16:06 +0000 Received: from mgamail.intel.com ([198.175.65.12]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs4DR-0000000H840-1Bgm for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2024 17:16:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712164562; x=1743700562; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PM761U8KlFurCf4B7pY6nAuxa2K6lOSBEcR+3UzRD20=; b=UIEiVBx2b+jsICs9EJWgHUw0M2NNtWYCQBH3MdA8VDpyGsFRxfMgYioj 1lP1HK5a1nCCw4U/9N/J4CJ9SUSRJlAB4NflYVh1H28MbAuNfvTk/tXIu PjUQ4VylMVItXoCFMbVYGRWvzJE4T4ip0cRvHmrpsZihvGRYCdUo6XiqX dZ7tknLEKq3ktqXQrJ1u2ryuPcutzk/H52iHFAfh5Bnx5WXb+VKpPsVgk gORLsegy0Fq/8ts6Rl3CnhPV1sm0QKTGpVmNm2tTxB1h9FK9FlrT/MLPN CpFEG7vLAOqe0Q50zt6zrm5ejjliR0QJmDnJNjoCYwsD9M1Zo7i/GpR4G w==; X-CSE-ConnectionGUID: P9OXiyEzRO2UvL7Y7vYlpQ== X-CSE-MsgGUID: pFzrmz1vTAC4kNVKFY7yvA== X-IronPort-AV: E=McAfee;i="6600,9927,11033"; a="18863558" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="18863558" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 10:15:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11033"; a="937085340" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="937085340" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 03 Apr 2024 10:15:54 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id BE03D670; Wed, 3 Apr 2024 20:15:53 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown Subject: [PATCH v1 4/5] spi: pxa2xx: Remove timeout field from struct chip_data Date: Wed, 3 Apr 2024 20:06:38 +0300 Message-ID: <20240403171550.1074644-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240403171550.1074644-1-andriy.shevchenko@linux.intel.com> References: <20240403171550.1074644-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240403_101601_447002_0875C004 X-CRM114-Status: GOOD ( 13.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The timeout field is used only once and assigned to a predefined constant. Replace all that by using the constant directly. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-pxa2xx.c | 4 +--- drivers/spi/spi-pxa2xx.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 3ba0f5816f7f..030afb17e606 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1058,7 +1058,7 @@ static int pxa2xx_spi_transfer_one(struct spi_controller *controller, pxa_ssp_disable(drv_data->ssp); if (!pxa25x_ssp_comp(drv_data)) - pxa2xx_spi_write(drv_data, SSTO, chip->timeout); + pxa2xx_spi_write(drv_data, SSTO, TIMOUT_DFLT); /* First set CR1 without interrupt and service enables */ pxa2xx_spi_update(drv_data, SSCR1, change_mask, cr1); @@ -1200,8 +1200,6 @@ static int setup(struct spi_device *spi) chip = kzalloc(sizeof(struct chip_data), GFP_KERNEL); if (!chip) return -ENOMEM; - - chip->timeout = TIMOUT_DFLT; } chip->cr1 = 0; diff --git a/drivers/spi/spi-pxa2xx.h b/drivers/spi/spi-pxa2xx.h index 10294ef209d9..5f741bb30240 100644 --- a/drivers/spi/spi-pxa2xx.h +++ b/drivers/spi/spi-pxa2xx.h @@ -78,7 +78,6 @@ struct driver_data { struct chip_data { u32 cr1; u32 dds_rate; - u32 timeout; u32 threshold; u16 lpss_rx_threshold; u16 lpss_tx_threshold;