From patchwork Wed Apr 17 10:54:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13633208 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 327E1C4345F for ; Wed, 17 Apr 2024 11:05:39 +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=FtFThQKsbAggMlImFYvo40KK4aejktCO3jkBLZwpQrg=; b=vaY0C1yQPOH4ad uwhBJaxiPf1fhmunl62zUg8aM+zdwBbJtu8ydrqqBnUuTbi1AM4WyDSvCC455tteHArNXxiNElEps dyPjR630gzoea1kVf5VxgkqWX5CKtApsJi9MT4VDxzeP43A/DePPsTF/SoelntnDIVmTItB5oV+AS OlP2TXhID8S6jvmFJLSV7olB42xH2TXIiIEYbalmoOSd0NmfIws3JFgBxFP2tjzAoZbi+nQ/UspeK p41KxWjeBFbZl341PyBrM8Ss97oTi4dOK0Mlga7FwHeKnWrMrEhLgAhRabEHB6KNPy6bBUed68Je4 brxiMLXfZq4Vj6AAfN7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx36O-0000000FiO8-2Xh6; Wed, 17 Apr 2024 11:05:20 +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 1rx35D-0000000FhWQ-37wS for linux-arm-kernel@lists.infradead.org; Wed, 17 Apr 2024 11:04:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713351848; x=1744887848; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eKJwuwJhkJP8lPZ256GGIvTQ2O29fyGfookXc2AP3LI=; b=GzAwaebA3aiJNhLzLZgKSyVN+O5EDmewxz9+TnmiE4Rz8r6rEkFkJANy jDzx7we4uSGor9iJiru0xzSXbgJAs3WjNJLXvqhFcTL2JgQBlfExCGB6c ogqe1nZBu/kOFuBe/huc3KIuT7MLhZREXiu/UmzV2MgLHxiQcx0KJ65dZ QQoTMu+wXXvsthi4bHZLRPPkP7PbSiuow8Yx1gpSBzT019t9rNWAJc2Lc FP40dVybXNjw1JM/y5tWf56BSiojTIz6i6peVGWUbF80p/OORscSep5xJ VYkdlOg9CEDkhtfxPf5YRbm2ztNxOABF5IxND0RXOm4S5W1eb1b+5HgVt w==; X-CSE-ConnectionGUID: QRS7OA1GTLG3wyH4YEsOnw== X-CSE-MsgGUID: XoESZmWIRGeAZjAJ1Fp27w== X-IronPort-AV: E=McAfee;i="6600,9927,11046"; a="8698186" X-IronPort-AV: E=Sophos;i="6.07,209,1708416000"; d="scan'208";a="8698186" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2024 04:03:44 -0700 X-CSE-ConnectionGUID: 5ym2ePKORKagtOqI1/Mr8Q== X-CSE-MsgGUID: +5ppQoSEQ/GP0uKHk1l4Zw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,209,1708416000"; d="scan'208";a="27380729" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa004.jf.intel.com with ESMTP; 17 Apr 2024 04:03:41 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id BFF241506; 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 9/9] spi: pxa2xx: Don't provide struct chip_data for others Date: Wed, 17 Apr 2024 13:54:36 +0300 Message-ID: <20240417110334.2671228-10-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_040407_961845_B10DC03C X-CRM114-Status: GOOD ( 11.14 ) 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 Now the struct chip_data is local to spi-pxa2xx.c, move its definition to the C file. This will slightly speed up a build and also hide badly named data type (too generic). Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij --- drivers/spi/spi-pxa2xx.c | 8 ++++++++ drivers/spi/spi-pxa2xx.h | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 030afb17e606..efe76d0c21bb 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -66,6 +66,14 @@ MODULE_ALIAS("platform:pxa2xx-spi"); | CE4100_SSCR1_RFT | CE4100_SSCR1_TFT | SSCR1_MWDS \ | SSCR1_SPH | SSCR1_SPO | SSCR1_LBM) +struct chip_data { + u32 cr1; + u32 dds_rate; + u32 threshold; + u16 lpss_rx_threshold; + u16 lpss_tx_threshold; +}; + #define LPSS_GENERAL_REG_RXTO_HOLDOFF_DISABLE BIT(24) #define LPSS_CS_CONTROL_SW_MODE BIT(0) #define LPSS_CS_CONTROL_CS_HIGH BIT(1) diff --git a/drivers/spi/spi-pxa2xx.h b/drivers/spi/spi-pxa2xx.h index 5f741bb30240..93e1e471e1c6 100644 --- a/drivers/spi/spi-pxa2xx.h +++ b/drivers/spi/spi-pxa2xx.h @@ -75,14 +75,6 @@ struct driver_data { struct gpio_desc *gpiod_ready; }; -struct chip_data { - u32 cr1; - u32 dds_rate; - u32 threshold; - u16 lpss_rx_threshold; - u16 lpss_tx_threshold; -}; - static inline u32 pxa2xx_spi_read(const struct driver_data *drv_data, u32 reg) { return pxa_ssp_read_reg(drv_data->ssp, reg);