Message ID | b2035a8030b77e8a3eea87adf7e4a191c0a18717.1705944943.git.u.kleine-koenig@pengutronix.de |
---|---|
State | Superseded |
Headers | show |
Series | [v2,01/33] fpga: ice40-spi: Follow renaming of SPI "master" to "controller" | expand |
Hi Uwe,
kernel test robot noticed the following build errors:
[auto build test ERROR on 6613476e225e090cc9aad49be7fa504e290dd33d]
url: https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/fpga-ice40-spi-Follow-renaming-of-SPI-master-to-controller/20240123-031635
base: 6613476e225e090cc9aad49be7fa504e290dd33d
patch link: https://lore.kernel.org/r/b2035a8030b77e8a3eea87adf7e4a191c0a18717.1705944943.git.u.kleine-koenig%40pengutronix.de
patch subject: [PATCH v2 17/33] spi: bitbang: Follow renaming of SPI "master" to "controller"
config: mips-db1xxx_defconfig (https://download.01.org/0day-ci/archive/20240130/202401301813.fehkuS9c-lkp@intel.com/config)
compiler: mipsel-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240130/202401301813.fehkuS9c-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401301813.fehkuS9c-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/spi/spi-au1550.c: In function 'au1550_spi_probe':
>> drivers/spi/spi-au1550.c:803:20: error: 'struct spi_bitbang' has no member named 'master'
803 | hw->bitbang.master = hw->host;
| ^
vim +803 drivers/spi/spi-au1550.c
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 721
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 722
2deff8d602e8c9 drivers/spi/spi-au1550.c Grant Likely 2013-02-05 723 static int au1550_spi_probe(struct platform_device *pdev)
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 724 {
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 725 struct au1550_spi *hw;
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 726 struct spi_controller *host;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 727 struct resource *r;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 728 int err = 0;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 729
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 730 host = spi_alloc_host(&pdev->dev, sizeof(struct au1550_spi));
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 731 if (host == NULL) {
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 732 dev_err(&pdev->dev, "No memory for spi_controller\n");
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 733 err = -ENOMEM;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 734 goto err_nomem;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 735 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 736
e7db06b5d5afce drivers/spi/au1550_spi.c David Brownell 2009-06-17 737 /* the spi->mode bits understood by this driver: */
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 738 host->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST;
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 739 host->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 24);
e7db06b5d5afce drivers/spi/au1550_spi.c David Brownell 2009-06-17 740
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 741 hw = spi_controller_get_devdata(host);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 742
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 743 hw->host = host;
8074cf063e410a drivers/spi/spi-au1550.c Jingoo Han 2013-07-30 744 hw->pdata = dev_get_platdata(&pdev->dev);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 745 hw->dev = &pdev->dev;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 746
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 747 if (hw->pdata == NULL) {
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 748 dev_err(&pdev->dev, "No platform data supplied\n");
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 749 err = -ENOENT;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 750 goto err_no_pdata;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 751 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 752
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 753 r = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 754 if (!r) {
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 755 dev_err(&pdev->dev, "no IRQ\n");
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 756 err = -ENODEV;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 757 goto err_no_iores;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 758 }
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 759 hw->irq = r->start;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 760
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 761 hw->usedma = 0;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 762 r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 763 if (r) {
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 764 hw->dma_tx_id = r->start;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 765 r = platform_get_resource(pdev, IORESOURCE_DMA, 1);
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 766 if (r) {
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 767 hw->dma_rx_id = r->start;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 768 if (usedma && ddma_memid) {
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 769 if (pdev->dev.dma_mask == NULL)
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 770 dev_warn(&pdev->dev, "no dma mask\n");
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 771 else
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 772 hw->usedma = 1;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 773 }
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 774 }
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 775 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 776
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 777 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 778 if (!r) {
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 779 dev_err(&pdev->dev, "no mmio resource\n");
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 780 err = -ENODEV;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 781 goto err_no_iores;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 782 }
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 783
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 784 hw->ioarea = request_mem_region(r->start, sizeof(psc_spi_t),
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 785 pdev->name);
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 786 if (!hw->ioarea) {
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 787 dev_err(&pdev->dev, "Cannot reserve iomem region\n");
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 788 err = -ENXIO;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 789 goto err_no_iores;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 790 }
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 791
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 792 hw->regs = (psc_spi_t __iomem *)ioremap(r->start, sizeof(psc_spi_t));
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 793 if (!hw->regs) {
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 794 dev_err(&pdev->dev, "cannot ioremap\n");
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 795 err = -ENXIO;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 796 goto err_ioremap;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 797 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 798
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 799 platform_set_drvdata(pdev, hw);
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 800
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 801 init_completion(&hw->host_done);
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 802
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 @803 hw->bitbang.master = hw->host;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 804 hw->bitbang.setup_transfer = au1550_spi_setupxfer;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 805 hw->bitbang.chipselect = au1550_spi_chipsel;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 806 hw->bitbang.txrx_bufs = au1550_spi_txrx_bufs;
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 807
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 808 if (hw->usedma) {
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 809 hw->dma_tx_ch = au1xxx_dbdma_chan_alloc(ddma_memid,
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 810 hw->dma_tx_id, NULL, (void *)hw);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 811 if (hw->dma_tx_ch == 0) {
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 812 dev_err(&pdev->dev,
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 813 "Cannot allocate tx dma channel\n");
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 814 err = -ENXIO;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 815 goto err_no_txdma;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 816 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 817 au1xxx_dbdma_set_devwidth(hw->dma_tx_ch, 8);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 818 if (au1xxx_dbdma_ring_alloc(hw->dma_tx_ch,
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 819 AU1550_SPI_DBDMA_DESCRIPTORS) == 0) {
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 820 dev_err(&pdev->dev,
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 821 "Cannot allocate tx dma descriptors\n");
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 822 err = -ENXIO;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 823 goto err_no_txdma_descr;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 824 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 825
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 826
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 827 hw->dma_rx_ch = au1xxx_dbdma_chan_alloc(hw->dma_rx_id,
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 828 ddma_memid, NULL, (void *)hw);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 829 if (hw->dma_rx_ch == 0) {
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 830 dev_err(&pdev->dev,
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 831 "Cannot allocate rx dma channel\n");
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 832 err = -ENXIO;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 833 goto err_no_rxdma;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 834 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 835 au1xxx_dbdma_set_devwidth(hw->dma_rx_ch, 8);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 836 if (au1xxx_dbdma_ring_alloc(hw->dma_rx_ch,
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 837 AU1550_SPI_DBDMA_DESCRIPTORS) == 0) {
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 838 dev_err(&pdev->dev,
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 839 "Cannot allocate rx dma descriptors\n");
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 840 err = -ENXIO;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 841 goto err_no_rxdma_descr;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 842 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 843
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 844 err = au1550_spi_dma_rxtmp_alloc(hw,
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 845 AU1550_SPI_DMA_RXTMP_MINSIZE);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 846 if (err < 0) {
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 847 dev_err(&pdev->dev,
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 848 "Cannot allocate initial rx dma tmp buffer\n");
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 849 goto err_dma_rxtmp_alloc;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 850 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 851 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 852
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 853 au1550_spi_bits_handlers_set(hw, 8);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 854
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 855 err = request_irq(hw->irq, au1550_spi_irq, 0, pdev->name, hw);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 856 if (err) {
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 857 dev_err(&pdev->dev, "Cannot claim IRQ\n");
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 858 goto err_no_irq;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 859 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 860
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 861 host->bus_num = pdev->id;
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 862 host->num_chipselect = hw->pdata->num_chipselect;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 863
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 864 /*
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 865 * precompute valid range for spi freq - from au1550 datasheet:
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 866 * psc_tempclk = psc_mainclk / (2 << DIV)
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 867 * spiclk = psc_tempclk / (2 * (BRG + 1))
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 868 * BRG valid range is 4..63
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 869 * DIV valid range is 0..3
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 870 * round the min and max frequencies to values that would still
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 871 * produce valid brg and div
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 872 */
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 873 {
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 874 int min_div = (2 << 0) * (2 * (4 + 1));
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 875 int max_div = (2 << 3) * (2 * (63 + 1));
9cae7e9d78e27d drivers/spi/spi-au1550.c corentin 2021-01-22 876
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 877 host->max_speed_hz = hw->pdata->mainclk_hz / min_div;
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 878 host->min_speed_hz =
0dd26e53b56137 drivers/spi/spi-au1550.c Axel Lin 2014-02-11 879 hw->pdata->mainclk_hz / (max_div + 1) + 1;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 880 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 881
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 882 au1550_spi_setup_psc_as_spi(hw);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 883
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 884 err = spi_bitbang_start(&hw->bitbang);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 885 if (err) {
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 886 dev_err(&pdev->dev, "Failed to register SPI host\n");
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 887 goto err_register;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 888 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 889
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 890 dev_info(&pdev->dev,
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 891 "spi host registered: bus_num=%d num_chipselect=%d\n",
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 892 host->bus_num, host->num_chipselect);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 893
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 894 return 0;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 895
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 896 err_register:
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 897 free_irq(hw->irq, hw);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 898
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 899 err_no_irq:
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 900 au1550_spi_dma_rxtmp_free(hw);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 901
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 902 err_dma_rxtmp_alloc:
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 903 err_no_rxdma_descr:
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 904 if (hw->usedma)
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 905 au1xxx_dbdma_chan_free(hw->dma_rx_ch);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 906
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 907 err_no_rxdma:
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 908 err_no_txdma_descr:
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 909 if (hw->usedma)
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 910 au1xxx_dbdma_chan_free(hw->dma_tx_ch);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 911
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 912 err_no_txdma:
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 913 iounmap((void __iomem *)hw->regs);
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 914
3a93a159c61e38 drivers/spi/au1550_spi.c Manuel Lauss 2008-07-23 915 err_ioremap:
30670539b867d0 drivers/spi/spi-au1550.c Himangi Saraogi 2014-07-04 916 release_mem_region(r->start, sizeof(psc_spi_t));
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 917
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 918 err_no_iores:
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 919 err_no_pdata:
0c35cc597b211e drivers/spi/spi-au1550.c Yang Yingliang 2023-08-07 920 spi_controller_put(hw->host);
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 921
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 922 err_nomem:
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 923 return err;
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 924 }
63bd23591e6c38 drivers/spi/au1550_spi.c Jan Nikitenko 2007-05-08 925
Hello, On Tue, Jan 30, 2024 at 06:46:16PM +0800, kernel test robot wrote: > kernel test robot noticed the following build errors: > > [auto build test ERROR on 6613476e225e090cc9aad49be7fa504e290dd33d] > > url: https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/fpga-ice40-spi-Follow-renaming-of-SPI-master-to-controller/20240123-031635 > base: 6613476e225e090cc9aad49be7fa504e290dd33d > patch link: https://lore.kernel.org/r/b2035a8030b77e8a3eea87adf7e4a191c0a18717.1705944943.git.u.kleine-koenig%40pengutronix.de > patch subject: [PATCH v2 17/33] spi: bitbang: Follow renaming of SPI "master" to "controller" > config: mips-db1xxx_defconfig (https://download.01.org/0day-ci/archive/20240130/202401301813.fehkuS9c-lkp@intel.com/config) > compiler: mipsel-linux-gcc (GCC) 13.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240130/202401301813.fehkuS9c-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot <lkp@intel.com> > | Closes: https://lore.kernel.org/oe-kbuild-all/202401301813.fehkuS9c-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > drivers/spi/spi-au1550.c: In function 'au1550_spi_probe': > >> drivers/spi/spi-au1550.c:803:20: error: 'struct spi_bitbang' has no member named 'master' > 803 | hw->bitbang.master = hw->host; > | ^ Dang, didn't build test on mips. Will send a v3 once I did a few more build tests. Best regards Uwe
diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c index b7ada981464a..d78762d4db98 100644 --- a/drivers/spi/spi-ath79.c +++ b/drivers/spi/spi-ath79.c @@ -189,7 +189,7 @@ static int ath79_spi_probe(struct platform_device *pdev) host->num_chipselect = 3; host->mem_ops = &ath79_mem_ops; - sp->bitbang.master = host; + sp->bitbang.ctlr = host; sp->bitbang.chipselect = ath79_spi_chipselect; sp->bitbang.txrx_word[SPI_MODE_0] = ath79_spi_txrx_mode0; sp->bitbang.flags = SPI_CS_HIGH; @@ -237,7 +237,7 @@ static void ath79_spi_remove(struct platform_device *pdev) spi_bitbang_stop(&sp->bitbang); ath79_spi_disable(sp); - spi_controller_put(sp->bitbang.master); + spi_controller_put(sp->bitbang.ctlr); } static void ath79_spi_shutdown(struct platform_device *pdev) diff --git a/drivers/spi/spi-bitbang.c b/drivers/spi/spi-bitbang.c index ecd44016c197..a0e2204fc039 100644 --- a/drivers/spi/spi-bitbang.c +++ b/drivers/spi/spi-bitbang.c @@ -187,7 +187,7 @@ int spi_bitbang_setup(struct spi_device *spi) bool initial_setup = false; int retval; - bitbang = spi_master_get_devdata(spi->master); + bitbang = spi_controller_get_devdata(spi->controller); if (!cs) { cs = kzalloc(sizeof(*cs), GFP_KERNEL); @@ -236,7 +236,7 @@ static int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t) unsigned nsecs = cs->nsecs; struct spi_bitbang *bitbang; - bitbang = spi_master_get_devdata(spi->master); + bitbang = spi_controller_get_devdata(spi->controller); if (bitbang->set_line_direction) { int err; @@ -268,11 +268,11 @@ static int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t) * transfer-at-a-time ones to leverage dma or fifo hardware. */ -static int spi_bitbang_prepare_hardware(struct spi_master *spi) +static int spi_bitbang_prepare_hardware(struct spi_controller *spi) { struct spi_bitbang *bitbang; - bitbang = spi_master_get_devdata(spi); + bitbang = spi_controller_get_devdata(spi); mutex_lock(&bitbang->lock); bitbang->busy = 1; @@ -281,11 +281,11 @@ static int spi_bitbang_prepare_hardware(struct spi_master *spi) return 0; } -static int spi_bitbang_transfer_one(struct spi_master *master, +static int spi_bitbang_transfer_one(struct spi_controller *ctlr, struct spi_device *spi, struct spi_transfer *transfer) { - struct spi_bitbang *bitbang = spi_master_get_devdata(master); + struct spi_bitbang *bitbang = spi_controller_get_devdata(ctlr); int status = 0; if (bitbang->setup_transfer) { @@ -303,16 +303,16 @@ static int spi_bitbang_transfer_one(struct spi_master *master, status = -EREMOTEIO; out: - spi_finalize_current_transfer(master); + spi_finalize_current_transfer(ctlr); return status; } -static int spi_bitbang_unprepare_hardware(struct spi_master *spi) +static int spi_bitbang_unprepare_hardware(struct spi_controller *spi) { struct spi_bitbang *bitbang; - bitbang = spi_master_get_devdata(spi); + bitbang = spi_controller_get_devdata(spi); mutex_lock(&bitbang->lock); bitbang->busy = 0; @@ -323,7 +323,7 @@ static int spi_bitbang_unprepare_hardware(struct spi_master *spi) static void spi_bitbang_set_cs(struct spi_device *spi, bool enable) { - struct spi_bitbang *bitbang = spi_master_get_devdata(spi->master); + struct spi_bitbang *bitbang = spi_controller_get_devdata(spi->controller); /* SPI core provides CS high / low, but bitbang driver * expects CS active @@ -341,10 +341,10 @@ static void spi_bitbang_set_cs(struct spi_device *spi, bool enable) int spi_bitbang_init(struct spi_bitbang *bitbang) { - struct spi_master *master = bitbang->master; + struct spi_controller *ctlr = bitbang->ctlr; bool custom_cs; - if (!master) + if (!ctlr) return -EINVAL; /* * We only need the chipselect callback if we are actually using it. @@ -352,39 +352,39 @@ int spi_bitbang_init(struct spi_bitbang *bitbang) * SPI_CONTROLLER_GPIO_SS flag is set, we always need to call the * driver-specific chipselect routine. */ - custom_cs = (!master->use_gpio_descriptors || - (master->flags & SPI_CONTROLLER_GPIO_SS)); + custom_cs = (!ctlr->use_gpio_descriptors || + (ctlr->flags & SPI_CONTROLLER_GPIO_SS)); if (custom_cs && !bitbang->chipselect) return -EINVAL; mutex_init(&bitbang->lock); - if (!master->mode_bits) - master->mode_bits = SPI_CPOL | SPI_CPHA | bitbang->flags; + if (!ctlr->mode_bits) + ctlr->mode_bits = SPI_CPOL | SPI_CPHA | bitbang->flags; - if (master->transfer || master->transfer_one_message) + if (ctlr->transfer || ctlr->transfer_one_message) return -EINVAL; - master->prepare_transfer_hardware = spi_bitbang_prepare_hardware; - master->unprepare_transfer_hardware = spi_bitbang_unprepare_hardware; - master->transfer_one = spi_bitbang_transfer_one; + ctlr->prepare_transfer_hardware = spi_bitbang_prepare_hardware; + ctlr->unprepare_transfer_hardware = spi_bitbang_unprepare_hardware; + ctlr->transfer_one = spi_bitbang_transfer_one; /* * When using GPIO descriptors, the ->set_cs() callback doesn't even * get called unless SPI_CONTROLLER_GPIO_SS is set. */ if (custom_cs) - master->set_cs = spi_bitbang_set_cs; + ctlr->set_cs = spi_bitbang_set_cs; if (!bitbang->txrx_bufs) { bitbang->use_dma = 0; bitbang->txrx_bufs = spi_bitbang_bufs; - if (!master->setup) { + if (!ctlr->setup) { if (!bitbang->setup_transfer) bitbang->setup_transfer = spi_bitbang_setup_transfer; - master->setup = spi_bitbang_setup; - master->cleanup = spi_bitbang_cleanup; + ctlr->setup = spi_bitbang_setup; + ctlr->cleanup = spi_bitbang_cleanup; } } @@ -411,18 +411,18 @@ EXPORT_SYMBOL_GPL(spi_bitbang_init); * master methods. Those methods are the defaults if the bitbang->txrx_bufs * routine isn't initialized. * - * This routine registers the spi_master, which will process requests in a + * This routine registers the spi_controller, which will process requests in a * dedicated task, keeping IRQs unblocked most of the time. To stop * processing those requests, call spi_bitbang_stop(). * - * On success, this routine will take a reference to master. The caller is - * responsible for calling spi_bitbang_stop() to decrement the reference and - * spi_master_put() as counterpart of spi_alloc_master() to prevent a memory + * On success, this routine will take a reference to the controller. The caller + * is responsible for calling spi_bitbang_stop() to decrement the reference and + * spi_controller_put() as counterpart of spi_alloc_master() to prevent a memory * leak. */ int spi_bitbang_start(struct spi_bitbang *bitbang) { - struct spi_master *master = bitbang->master; + struct spi_controller *ctlr = bitbang->ctlr; int ret; ret = spi_bitbang_init(bitbang); @@ -432,9 +432,9 @@ int spi_bitbang_start(struct spi_bitbang *bitbang) /* driver may get busy before register() returns, especially * if someone registered boardinfo for devices */ - ret = spi_register_master(spi_master_get(master)); + ret = spi_register_controller(spi_controller_get(ctlr)); if (ret) - spi_master_put(master); + spi_controller_put(ctlr); return ret; } @@ -445,7 +445,7 @@ EXPORT_SYMBOL_GPL(spi_bitbang_start); */ void spi_bitbang_stop(struct spi_bitbang *bitbang) { - spi_unregister_master(bitbang->master); + spi_unregister_controller(bitbang->ctlr); } EXPORT_SYMBOL_GPL(spi_bitbang_stop); diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c index 289b4454242a..1d267e6c22a4 100644 --- a/drivers/spi/spi-butterfly.c +++ b/drivers/spi/spi-butterfly.c @@ -205,7 +205,7 @@ static void butterfly_attach(struct parport *p) host->bus_num = 42; host->num_chipselect = 2; - pp->bitbang.master = host; + pp->bitbang.ctlr = host; pp->bitbang.chipselect = butterfly_chipselect; pp->bitbang.txrx_word[SPI_MODE_0] = butterfly_txrx_word_mode0; @@ -263,7 +263,7 @@ static void butterfly_attach(struct parport *p) pp->info[0].platform_data = &flash; pp->info[0].chip_select = 1; pp->info[0].controller_data = pp; - pp->dataflash = spi_new_device(pp->bitbang.master, &pp->info[0]); + pp->dataflash = spi_new_device(pp->bitbang.ctlr, &pp->info[0]); if (pp->dataflash) pr_debug("%s: dataflash at %s\n", p->name, dev_name(&pp->dataflash->dev)); @@ -308,7 +308,7 @@ static void butterfly_detach(struct parport *p) parport_release(pp->pd); parport_unregister_device(pp->pd); - spi_controller_put(pp->bitbang.master); + spi_controller_put(pp->bitbang.ctlr); } static struct parport_driver butterfly_driver = { diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 5688be245c68..be3998104bfb 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -459,7 +459,7 @@ static bool davinci_spi_can_dma(struct spi_controller *host, static int davinci_spi_check_error(struct davinci_spi *dspi, int int_status) { - struct device *sdev = dspi->bitbang.master->dev.parent; + struct device *sdev = dspi->bitbang.ctlr->dev.parent; if (int_status & SPIFLG_TIMEOUT_MASK) { dev_err(sdev, "SPI Time-out Error\n"); @@ -742,7 +742,7 @@ static irqreturn_t davinci_spi_irq(s32 irq, void *data) static int davinci_spi_request_dma(struct davinci_spi *dspi) { - struct device *sdev = dspi->bitbang.master->dev.parent; + struct device *sdev = dspi->bitbang.ctlr->dev.parent; dspi->dma_rx = dma_request_chan(sdev, "rx"); if (IS_ERR(dspi->dma_rx)) @@ -913,7 +913,7 @@ static int davinci_spi_probe(struct platform_device *pdev) if (ret) goto free_host; - dspi->bitbang.master = host; + dspi->bitbang.ctlr = host; dspi->clk = devm_clk_get_enabled(&pdev->dev, NULL); if (IS_ERR(dspi->clk)) { diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index d8db4564b406..909cce109bba 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c @@ -427,7 +427,7 @@ static int spi_gpio_probe(struct platform_device *pdev) host->cleanup = spi_gpio_cleanup; bb = &spi_gpio->bitbang; - bb->master = host; + bb->ctlr = host; /* * There is some additional business, apart from driving the CS GPIO * line, that we need to do on selection. This makes the local diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c index e6a65b5c8c31..f982bdebd028 100644 --- a/drivers/spi/spi-lm70llp.c +++ b/drivers/spi/spi-lm70llp.c @@ -212,7 +212,7 @@ static void spi_lm70llp_attach(struct parport *p) /* * SPI and bitbang hookup. */ - pp->bitbang.master = host; + pp->bitbang.ctlr = host; pp->bitbang.chipselect = lm70_chipselect; pp->bitbang.txrx_word[SPI_MODE_0] = lm70_txrx; pp->bitbang.flags = SPI_3WIRE; @@ -264,7 +264,7 @@ static void spi_lm70llp_attach(struct parport *p) * the board info's (void *)controller_data. */ pp->info.controller_data = pp; - pp->spidev_lm70 = spi_new_device(pp->bitbang.master, &pp->info); + pp->spidev_lm70 = spi_new_device(pp->bitbang.ctlr, &pp->info); if (pp->spidev_lm70) dev_dbg(&pp->spidev_lm70->dev, "spidev_lm70 at %s\n", dev_name(&pp->spidev_lm70->dev)); @@ -309,7 +309,7 @@ static void spi_lm70llp_detach(struct parport *p) parport_release(pp->pd); parport_unregister_device(pp->pd); - spi_controller_put(pp->bitbang.master); + spi_controller_put(pp->bitbang.ctlr); lm70llp = NULL; } diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c index cf7c111088a6..6ea38f5e7d64 100644 --- a/drivers/spi/spi-oc-tiny.c +++ b/drivers/spi/spi-oc-tiny.c @@ -194,7 +194,7 @@ static int tiny_spi_of_probe(struct platform_device *pdev) if (!np) return 0; - hw->bitbang.master->dev.of_node = pdev->dev.of_node; + hw->bitbang.ctlr->dev.of_node = pdev->dev.of_node; if (!of_property_read_u32(np, "clock-frequency", &val)) hw->freq = val; if (!of_property_read_u32(np, "baud-width", &val)) @@ -229,7 +229,7 @@ static int tiny_spi_probe(struct platform_device *pdev) platform_set_drvdata(pdev, hw); /* setup the state for the bitbang driver */ - hw->bitbang.master = host; + hw->bitbang.ctlr = host; hw->bitbang.setup_transfer = tiny_spi_setup_transfer; hw->bitbang.txrx_bufs = tiny_spi_txrx_bufs; @@ -274,7 +274,7 @@ static int tiny_spi_probe(struct platform_device *pdev) static void tiny_spi_remove(struct platform_device *pdev) { struct tiny_spi *hw = platform_get_drvdata(pdev); - struct spi_controller *host = hw->bitbang.master; + struct spi_controller *host = hw->bitbang.ctlr; spi_bitbang_stop(&hw->bitbang); spi_controller_put(host); diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c index 2dd1c1bcf4bf..210a98d903fa 100644 --- a/drivers/spi/spi-omap-uwire.c +++ b/drivers/spi/spi-omap-uwire.c @@ -448,7 +448,7 @@ static void uwire_off(struct uwire_spi *uwire) { uwire_write_reg(UWIRE_SR3, 0); clk_disable_unprepare(uwire->ck); - spi_controller_put(uwire->bitbang.master); + spi_controller_put(uwire->bitbang.ctlr); } static int uwire_probe(struct platform_device *pdev) @@ -493,7 +493,7 @@ static int uwire_probe(struct platform_device *pdev) host->setup = uwire_setup; host->cleanup = uwire_cleanup; - uwire->bitbang.master = host; + uwire->bitbang.ctlr = host; uwire->bitbang.chipselect = uwire_chipselect; uwire->bitbang.setup_transfer = uwire_setup_transfer; uwire->bitbang.txrx_bufs = uwire_txrx; diff --git a/drivers/spi/spi-sh-sci.c b/drivers/spi/spi-sh-sci.c index 148d615d2f38..3d560b154ad3 100644 --- a/drivers/spi/spi-sh-sci.c +++ b/drivers/spi/spi-sh-sci.c @@ -136,9 +136,9 @@ static int sh_sci_spi_probe(struct platform_device *dev) } /* setup spi bitbang adaptor */ - sp->bitbang.master = host; - sp->bitbang.master->bus_num = sp->info->bus_num; - sp->bitbang.master->num_chipselect = sp->info->num_chipselect; + sp->bitbang.ctlr = host; + sp->bitbang.ctlr->bus_num = sp->info->bus_num; + sp->bitbang.ctlr->num_chipselect = sp->info->num_chipselect; sp->bitbang.chipselect = sh_sci_spi_chipselect; sp->bitbang.txrx_word[SPI_MODE_0] = sh_sci_spi_txrx_mode0; @@ -166,7 +166,7 @@ static int sh_sci_spi_probe(struct platform_device *dev) setbits(sp, PIN_INIT, 0); iounmap(sp->membase); err1: - spi_controller_put(sp->bitbang.master); + spi_controller_put(sp->bitbang.ctlr); err0: return ret; } @@ -178,7 +178,7 @@ static void sh_sci_spi_remove(struct platform_device *dev) spi_bitbang_stop(&sp->bitbang); setbits(sp, PIN_INIT, 0); iounmap(sp->membase); - spi_controller_put(sp->bitbang.master); + spi_controller_put(sp->bitbang.ctlr); } static struct platform_driver sh_sci_spi_drv = { diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c index 12355957be97..7795328427a6 100644 --- a/drivers/spi/spi-xilinx.c +++ b/drivers/spi/spi-xilinx.c @@ -434,7 +434,7 @@ static int xilinx_spi_probe(struct platform_device *pdev) xspi = spi_controller_get_devdata(host); xspi->cs_inactive = 0xffffffff; - xspi->bitbang.master = host; + xspi->bitbang.ctlr = host; xspi->bitbang.chipselect = xilinx_spi_chipselect; xspi->bitbang.setup_transfer = xilinx_spi_setup_transfer; xspi->bitbang.txrx_bufs = xilinx_spi_txrx_bufs; @@ -516,7 +516,7 @@ static void xilinx_spi_remove(struct platform_device *pdev) /* Disable the global IPIF interrupt */ xspi->write_fn(0, regs_base + XIPIF_V123B_DGIER_OFFSET); - spi_controller_put(xspi->bitbang.master); + spi_controller_put(xspi->bitbang.ctlr); } /* work with hotplug and coldplug */ diff --git a/drivers/spi/spi-xtensa-xtfpga.c b/drivers/spi/spi-xtensa-xtfpga.c index 3c7721894376..3c2cda315397 100644 --- a/drivers/spi/spi-xtensa-xtfpga.c +++ b/drivers/spi/spi-xtensa-xtfpga.c @@ -93,7 +93,7 @@ static int xtfpga_spi_probe(struct platform_device *pdev) host->dev.of_node = pdev->dev.of_node; xspi = spi_controller_get_devdata(host); - xspi->bitbang.master = host; + xspi->bitbang.ctlr = host; xspi->bitbang.chipselect = xtfpga_spi_chipselect; xspi->bitbang.txrx_word[SPI_MODE_0] = xtfpga_spi_txrx_word; xspi->regs = devm_platform_ioremap_resource(pdev, 0); diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index 4444c2a992cb..b930eca2ef7b 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h @@ -10,7 +10,7 @@ struct spi_bitbang { u8 use_dma; u16 flags; /* extra spi->mode support */ - struct spi_master *master; + struct spi_controller *ctlr; /* setup_transfer() changes clock and/or wordsize to match settings * for this transfer; zeroes restore defaults from spi_device.
In commit 8caab75fd2c2 ("spi: Generalize SPI "master" to "controller"") some functions and struct members were renamed. To not break all drivers compatibility macros were provided. To be able to remove these compatibility macros push the renaming into the SPI bitbang controller drivers. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- drivers/spi/spi-ath79.c | 4 +-- drivers/spi/spi-bitbang.c | 64 ++++++++++++++++----------------- drivers/spi/spi-butterfly.c | 6 ++-- drivers/spi/spi-davinci.c | 6 ++-- drivers/spi/spi-gpio.c | 2 +- drivers/spi/spi-lm70llp.c | 6 ++-- drivers/spi/spi-oc-tiny.c | 6 ++-- drivers/spi/spi-omap-uwire.c | 4 +-- drivers/spi/spi-sh-sci.c | 10 +++--- drivers/spi/spi-xilinx.c | 4 +-- drivers/spi/spi-xtensa-xtfpga.c | 2 +- include/linux/spi/spi_bitbang.h | 2 +- 12 files changed, 58 insertions(+), 58 deletions(-)