ath79: add support for TP-Link Archer C60 v3
[oweals/openwrt.git] / target / linux / ath79 / patches-5.4 / 0033-spi-ath79-drop-pdata-support.patch
1 From c4e197bbcecc7233aa9e553e7047fa50e4e1fe77 Mon Sep 17 00:00:00 2001
2 From: John Crispin <john@phrozen.org>
3 Date: Mon, 25 Jun 2018 15:52:34 +0200
4 Subject: [PATCH 33/33] spi: ath79: drop pdata support
5
6 The target is being converted to pure OF. We can therefore drop all of the
7 platform data code from the driver.
8
9 Cc: linux-spi@vger.kernel.org
10 Acked-by: Mark Brown <broonie@kernel.org>
11 Signed-off-by: John Crispin <john@phrozen.org>
12 ---
13  include/linux/platform_data/spi-ath79.h | 16 -------------------
14  drivers/spi/spi-ath79.c                               |  8 --------
15  2 files changed, 27 deletions(-)
16  delete mode 100644 arch/mips/include/asm/mach-ath79/ath79_spi_platform.h
17
18 --- a/include/linux/platform_data/spi-ath79.h
19 +++ /dev/null
20 @@ -1,16 +0,0 @@
21 -/* SPDX-License-Identifier: GPL-2.0-only */
22 -/*
23 - *  Platform data definition for Atheros AR71XX/AR724X/AR913X SPI controller
24 - *
25 - *  Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
26 - */
27 -
28 -#ifndef _ATH79_SPI_PLATFORM_H
29 -#define _ATH79_SPI_PLATFORM_H
30 -
31 -struct ath79_spi_platform_data {
32 -       unsigned        bus_num;
33 -       unsigned        num_chipselect;
34 -};
35 -
36 -#endif /* _ATH79_SPI_PLATFORM_H */
37 --- a/drivers/spi/spi-ath79.c
38 +++ b/drivers/spi/spi-ath79.c
39 @@ -19,7 +19,6 @@
40  #include <linux/bitops.h>
41  #include <linux/clk.h>
42  #include <linux/err.h>
43 -#include <linux/platform_data/spi-ath79.h>
44  
45  #define DRV_NAME       "ath79-spi"
46  
47 @@ -138,7 +137,6 @@ static int ath79_spi_probe(struct platfo
48  {
49         struct spi_master *master;
50         struct ath79_spi *sp;
51 -       struct ath79_spi_platform_data *pdata;
52         unsigned long rate;
53         int ret;
54  
55 @@ -152,16 +150,10 @@ static int ath79_spi_probe(struct platfo
56         master->dev.of_node = pdev->dev.of_node;
57         platform_set_drvdata(pdev, sp);
58  
59 -       pdata = dev_get_platdata(&pdev->dev);
60 -
61         master->use_gpio_descriptors = true;
62         master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32);
63         master->setup = spi_bitbang_setup;
64         master->cleanup = spi_bitbang_cleanup;
65 -       if (pdata) {
66 -               master->bus_num = pdata->bus_num;
67 -               master->num_chipselect = pdata->num_chipselect;
68 -       }
69  
70         sp->bitbang.master = master;
71         sp->bitbang.chipselect = ath79_spi_chipselect;