From patchwork Wed Apr 17 10:54:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13633206 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 C362FC4345F for ; Wed, 17 Apr 2024 11:04:37 +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=iVTQ5TqEAz5IGnQN9+xH/L0yNJ6yHirPGv5ZUv5FXY8=; b=vuxz7ww9oq4gjk N0i2EqauBTsN3CQ8FBHTZpN/pWeroxN5hsa33yRWMXfq7O6/wKD4pq1Vtdr/VXeOeh0C3VUeO7X3B zXyJqS8/QcsPKWGMTOND4+wHINaH2laHHxscy9CAAsWd6LTGvNM6UsUbSjvHCixxyjm53qQpo1Y+B TfCwV3R94EzPtDN0+MlDU1udKzG4hqrUKM9XwnvViAWUjStM0gc5Z4KgZ12YQucoGLASoVn/uYFxV DeLA2CJ3sWB+mRh6cdhq+MHBUi3Kk05XZtgO44kpd7rWOCUo+oOwKIgp7AGXXjDN0IkEnspypVMxV fSXRvWwKbT6CGYu6L0jQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx35O-0000000Fhn7-0C0c; Wed, 17 Apr 2024 11:04:18 +0000 Received: from mgamail.intel.com ([192.198.163.19]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx358-0000000FhXz-16Uv for linux-arm-kernel@lists.infradead.org; Wed, 17 Apr 2024 11:04:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713351842; x=1744887842; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9qZmuA7jLecFtZoV4feOe4GVLTIJuoKfF/zfVdw+9zo=; b=g7Szh7xyAVuPyl42TTw84ZdXSesurymlR5dBhotQRNEIzbIYq4Ue+VcA T/ihkbFYbPyCv+pSjYgHgwowj3yNzPz4kZ1KswI+sMAXnycBwGIfsf0oP Romgi4kDHnu1CBVi7fnbeMxs3yIkOE6bQb1ysDeIDWXwO4EyJpM8/gg1C VG0dgWtWY6/5xc08A4hr+26k5Aq5uG39sLtjus4REnqno81rUaO1ys563 TvZ9n9fYv61VKzXTCPVB3Bshqq8SVQGPX/vT28iQZ+xwOCyLIHdG7kMZj i7xCRHntBaNV9VJ54VM7esTvIX98BFOiHfRLaCrv1ZEMxb6gFiMW0JCl0 A==; X-CSE-ConnectionGUID: TRNt64DTTVi3XQTES76+qQ== X-CSE-MsgGUID: qCg/HnEwTe2K+8xu1cCgYA== X-IronPort-AV: E=McAfee;i="6600,9927,11046"; a="8698174" X-IronPort-AV: E=Sophos;i="6.07,209,1708416000"; d="scan'208";a="8698174" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2024 04:03:43 -0700 X-CSE-ConnectionGUID: 4bTWfvTES7mPrLoDdsjZqQ== X-CSE-MsgGUID: ADbg6H6IQJWW1oHVrXNl+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,209,1708416000"; d="scan'208";a="22653281" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa006.fm.intel.com with ESMTP; 17 Apr 2024 04:03:41 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B7B1514F6; Wed, 17 Apr 2024 14:03:36 +0300 (EEST) From: Andy Shevchenko To: Mark Brown , Andy Shevchenko , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King Subject: [PATCH v3 8/9] spi: pxa2xx: Remove timeout field from struct chip_data Date: Wed, 17 Apr 2024 13:54:35 +0300 Message-ID: <20240417110334.2671228-9-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240417110334.2671228-1-andriy.shevchenko@linux.intel.com> References: <20240417110334.2671228-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-20240417_040402_529800_E07CF0E5 X-CRM114-Status: GOOD ( 11.97 ) 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 Reviewed-by: Linus Walleij --- 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;