Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1180859ybz; Thu, 16 Apr 2020 04:33:08 -0700 (PDT) X-Google-Smtp-Source: APiQypLnDWfogT4xalS17F1w4vKeeOzzqOibQZ7XXh4eX+IEnv7Jm9pK+ytXWkUpo1cW2Lnr3YiY X-Received: by 2002:a17:906:804a:: with SMTP id x10mr9657078ejw.86.1587036787638; Thu, 16 Apr 2020 04:33:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587036787; cv=none; d=google.com; s=arc-20160816; b=tkjECGH2SjFmP3VphHvTDCmfOAifLUtoIAb002DMJ94H2ID5RvAisdkO2x7oA/V1Lg T3AKYPfLN82AjuUDAojyj5Q64BMECzZzDvTEEddJdu166dmdXl/JDPpCgHqdhXEfcR1g 7EStGM1YNN9DuXuJolON1V0RhVQL4kUvzVZqvRazP8vo+cUSdQtq98xLnugmhH3mDKDj 0ZWu8npoxn0DRqmx2kvHNqz7MKJ2GsHft80dwHA/yOc6ve04eSfEhvAMtSINEynJ4xF+ NlAcrPYFVSk5Vjm/BZ385ZC/QWJaXsNzpKRMfXsa/4S2bnrFKRXlto3+YwTun1rfno/H rsRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=/9ozp0KDY399qvVyuU0yqqBXwrfUSqHKw0SZnUo0Q9U=; b=byKr+Pho6MDsd81G3GxJMmHHZ/VL78nt7V7LH0vGVMmUGGmX1NB76E1SECmP3BZjuf dV8U+yfVxSfvTX5ZIdm0u0c349h7Sr2UInPN8A+JVPl0NHQcQIlC9uI6e1BzxkM31PtC 2meIA3+hDhU0KJvXiLqPk9muSR6j8Vf16E14/qHpF9VL9qQ7AmKG8fRQzxL0mSp7RmTg ytYCWBiZZOulksv8lZ+GAg/kJiBI4stin5gFKgKNQlwJfBHiXNLKlQEaVNRHx97rFCFq fCPfBI6V2ZRqRxwKV7mzomNEdA6JipOpGjSTbk9B++8tGRProHuY+ae0idWhh+4EqSiJ U4Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=H5OHYSPB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kalray.eu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si11589114edj.504.2020.04.16.04.32.44; Thu, 16 Apr 2020 04:33:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=H5OHYSPB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kalray.eu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633299AbgDPLbQ (ORCPT + 99 others); Thu, 16 Apr 2020 07:31:16 -0400 Received: from zimbra2.kalray.eu ([92.103.151.219]:45000 "EHLO zimbra2.kalray.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505763AbgDPLJ1 (ORCPT ); Thu, 16 Apr 2020 07:09:27 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 33C9627E0BD7; Thu, 16 Apr 2020 13:09:26 +0200 (CEST) Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id xjj4Iru9kw1A; Thu, 16 Apr 2020 13:09:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id B938D27E0B48; Thu, 16 Apr 2020 13:09:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu B938D27E0B48 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1587035365; bh=/9ozp0KDY399qvVyuU0yqqBXwrfUSqHKw0SZnUo0Q9U=; h=From:To:Date:Message-Id; b=H5OHYSPBp/LiWVVmJQ7U2HkcSlFzBvz5BvLwI27H19YKRCmNMjJ4aMHWH9VkQHHkS YRrmeVE6Fyns2B7bSwLu7WJyLZDN7pWeE972GDDhr36Gn16YMfKLxsFqWhaq8p/n2S a592HBHzWCUznn9uqwq0XUapMZWH1nRUGU8W2H78= X-Virus-Scanned: amavisd-new at zimbra2.kalray.eu Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JKONN3b7rFMU; Thu, 16 Apr 2020 13:09:25 +0200 (CEST) Received: from triton.lin.mbt.kalray.eu (unknown [192.168.37.25]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id 9C5F127E02FA; Thu, 16 Apr 2020 13:09:25 +0200 (CEST) From: Clement Leger To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Clement Leger Subject: [PATCH 1/2] spi: dw: remove unused dw_spi_chip handling Date: Thu, 16 Apr 2020 13:09:15 +0200 Message-Id: <20200416110916.22633-1-cleger@kalray.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416110823.22565-1-cleger@kalray.eu> References: <20200416110823.22565-1-cleger@kalray.eu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The path of code using this struct is unused since there is no more user of this. Remove code and struct definition. Signed-off-by: Clement Leger --- drivers/spi/spi-dw.c | 16 ---------------- drivers/spi/spi-dw.h | 12 ------------ 2 files changed, 28 deletions(-) diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index 31e3f866d11a..fda8d433a769 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c @@ -399,7 +399,6 @@ static void dw_spi_handle_err(struct spi_controller *master, /* This may be called twice for each spi dev */ static int dw_spi_setup(struct spi_device *spi) { - struct dw_spi_chip *chip_info = NULL; struct chip_data *chip; /* Only alloc on first setup */ @@ -411,21 +410,6 @@ static int dw_spi_setup(struct spi_device *spi) spi_set_ctldata(spi, chip); } - /* - * Protocol drivers may change the chip settings, so... - * if chip_info exists, use it - */ - chip_info = spi->controller_data; - - /* chip_info doesn't always exist */ - if (chip_info) { - if (chip_info->cs_control) - chip->cs_control = chip_info->cs_control; - - chip->poll_mode = chip_info->poll_mode; - chip->type = chip_info->type; - } - chip->tmode = SPI_TMOD_TR; return 0; diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h index 1bf5713e047d..44ef18187c15 100644 --- a/drivers/spi/spi-dw.h +++ b/drivers/spi/spi-dw.h @@ -235,18 +235,6 @@ static inline void spi_shutdown_chip(struct dw_spi *dws) spi_set_clk(dws, 0); } -/* - * Each SPI slave device to work with dw_api controller should - * has such a structure claiming its working mode (poll or PIO/DMA), - * which can be save in the "controller_data" member of the - * struct spi_device. - */ -struct dw_spi_chip { - u8 poll_mode; /* 1 for controller polling mode */ - u8 type; /* SPI/SSP/MicroWire */ - void (*cs_control)(u32 command); -}; - extern void dw_spi_set_cs(struct spi_device *spi, bool enable); extern int dw_spi_add_host(struct device *dev, struct dw_spi *dws); extern void dw_spi_remove_host(struct dw_spi *dws); -- 2.17.1