]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Merge remote-tracking branch 'spi/topic/pdata' into spi-next
authorMark Brown <broonie@linaro.org>
Sun, 1 Sep 2013 12:49:03 +0000 (13:49 +0100)
committerMark Brown <broonie@linaro.org>
Sun, 1 Sep 2013 12:49:03 +0000 (13:49 +0100)
1  2 
drivers/spi/spi-altera.c
drivers/spi/spi-bcm63xx.c
drivers/spi/spi-bfin-v3.c
drivers/spi/spi-davinci.c
drivers/spi/spi-ep93xx.c
drivers/spi/spi-mpc512x-psc.c
drivers/spi/spi-nuc900.c
drivers/spi/spi-oc-tiny.c
drivers/spi/spi-omap-100k.c
drivers/spi/spi-xilinx.c

Simple merge
Simple merge
Simple merge
Simple merge
index 31611f7d7be9b5445d0a76b93cd2def836217ab1,50831c837677fe7a6028a2b6e0f3161f11daf764..d22c00a227b683ea22b404d680575ae4a27efc9e
@@@ -874,26 -1022,16 +874,26 @@@ static int ep93xx_spi_probe(struct plat
        int irq;
        int error;
  
-       info = pdev->dev.platform_data;
+       info = dev_get_platdata(&pdev->dev);
  
 +      irq = platform_get_irq(pdev, 0);
 +      if (irq < 0) {
 +              dev_err(&pdev->dev, "failed to get irq resources\n");
 +              return -EBUSY;
 +      }
 +
 +      res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 +      if (!res) {
 +              dev_err(&pdev->dev, "unable to get iomem resource\n");
 +              return -ENODEV;
 +      }
 +
        master = spi_alloc_master(&pdev->dev, sizeof(*espi));
 -      if (!master) {
 -              dev_err(&pdev->dev, "failed to allocate spi master\n");
 +      if (!master)
                return -ENOMEM;
 -      }
  
        master->setup = ep93xx_spi_setup;
 -      master->transfer = ep93xx_spi_transfer;
 +      master->transfer_one_message = ep93xx_spi_transfer_one_message;
        master->cleanup = ep93xx_spi_cleanup;
        master->bus_num = pdev->id;
        master->num_chipselect = info->num_chipselect;
Simple merge
Simple merge
Simple merge
index cdcc72c5d380b3364936d377ddcc2f7f866829c6,b0e1d88f1635e66e63afd82ce95d108a4e03746c..69ecf05757dda6d5f8fc42f7718f7754af43f03c
@@@ -441,9 -512,13 +441,9 @@@ static int omap1_spi100k_probe(struct p
         * You should allocate this with ioremap() before initializing
         * the SPI.
         */
-       spi100k->base = (void __iomem *) pdev->dev.platform_data;
+       spi100k->base = (void __iomem *)dev_get_platdata(&pdev->dev);
  
 -      INIT_WORK(&spi100k->work, omap1_spi100k_work);
 -
 -      spin_lock_init(&spi100k->lock);
 -      INIT_LIST_HEAD(&spi100k->msg_queue);
 -      spi100k->ick = clk_get(&pdev->dev, "ick");
 +      spi100k->ick = devm_clk_get(&pdev->dev, "ick");
        if (IS_ERR(spi100k->ick)) {
                dev_dbg(&pdev->dev, "can't get spi100k_ick\n");
                status = PTR_ERR(spi100k->ick);
index fb56fcfdf65e76b3110ea75bdbb6d9f61141cb93,08ea84a6eb3283418484d4012298271ec6ab77ae..0bf1b2c457a1dc6b71cc69641216ac6bb8b4a87b
@@@ -360,24 -391,19 +376,18 @@@ static int xilinx_spi_probe(struct plat
        xspi->bitbang.chipselect = xilinx_spi_chipselect;
        xspi->bitbang.setup_transfer = xilinx_spi_setup_transfer;
        xspi->bitbang.txrx_bufs = xilinx_spi_txrx_bufs;
 -      xspi->bitbang.master->setup = xilinx_spi_setup;
        init_completion(&xspi->done);
  
-       if (!request_mem_region(mem->start, resource_size(mem),
-               XILINX_SPI_NAME))
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       xspi->regs = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(xspi->regs)) {
+               ret = PTR_ERR(xspi->regs);
                goto put_master;
-       xspi->regs = ioremap(mem->start, resource_size(mem));
-       if (xspi->regs == NULL) {
-               dev_warn(dev, "ioremap failure\n");
-               goto map_failed;
        }
  
-       master->bus_num = bus_num;
+       master->bus_num = pdev->dev.id;
        master->num_chipselect = num_cs;
-       master->dev.of_node = dev->of_node;
-       xspi->mem = *mem;
-       xspi->irq = irq;
+       master->dev.of_node = pdev->dev.of_node;
  
        /*
         * Detect endianess on the IP via loop bit in CR. Detection