aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-fsl-espi.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2013-12-19 09:08:03 -0500
committerJiri Kosina <jkosina@suse.cz>2013-12-19 09:08:32 -0500
commite23c34bb41da65f354fb7eee04300c56ee48f60c (patch)
tree549fbe449d55273b81ef104a9755109bf4ae7817 /drivers/spi/spi-fsl-espi.c
parentb481c2cb3534c85dca625973b33eba15f9af3e4c (diff)
parent319e2e3f63c348a9b66db4667efa73178e18b17d (diff)
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply fixes on top of newer things in tree (efi-stub). Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/spi/spi-fsl-espi.c')
-rw-r--r--drivers/spi/spi-fsl-espi.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c
index b8f1103fe28e..80d8f40f7e05 100644
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -16,6 +16,8 @@
16#include <linux/fsl_devices.h> 16#include <linux/fsl_devices.h>
17#include <linux/mm.h> 17#include <linux/mm.h>
18#include <linux/of.h> 18#include <linux/of.h>
19#include <linux/of_address.h>
20#include <linux/of_irq.h>
19#include <linux/of_platform.h> 21#include <linux/of_platform.h>
20#include <linux/interrupt.h> 22#include <linux/interrupt.h>
21#include <linux/err.h> 23#include <linux/err.h>
@@ -230,7 +232,7 @@ static int fsl_espi_bufs(struct spi_device *spi, struct spi_transfer *t)
230 mpc8xxx_spi->tx = t->tx_buf; 232 mpc8xxx_spi->tx = t->tx_buf;
231 mpc8xxx_spi->rx = t->rx_buf; 233 mpc8xxx_spi->rx = t->rx_buf;
232 234
233 INIT_COMPLETION(mpc8xxx_spi->done); 235 reinit_completion(&mpc8xxx_spi->done);
234 236
235 /* Set SPCOM[CS] and SPCOM[TRANLEN] field */ 237 /* Set SPCOM[CS] and SPCOM[TRANLEN] field */
236 if ((t->len - 1) > SPCOM_TRANLEN_MAX) { 238 if ((t->len - 1) > SPCOM_TRANLEN_MAX) {
@@ -289,8 +291,8 @@ static void fsl_espi_do_trans(struct spi_message *m,
289 if ((first->bits_per_word != t->bits_per_word) || 291 if ((first->bits_per_word != t->bits_per_word) ||
290 (first->speed_hz != t->speed_hz)) { 292 (first->speed_hz != t->speed_hz)) {
291 espi_trans->status = -EINVAL; 293 espi_trans->status = -EINVAL;
292 dev_err(mspi->dev, "bits_per_word/speed_hz should be" 294 dev_err(mspi->dev,
293 " same for the same SPI transfer\n"); 295 "bits_per_word/speed_hz should be same for the same SPI transfer\n");
294 return; 296 return;
295 } 297 }
296 298
@@ -687,7 +689,7 @@ static int of_fsl_espi_probe(struct platform_device *ofdev)
687 struct device_node *np = ofdev->dev.of_node; 689 struct device_node *np = ofdev->dev.of_node;
688 struct spi_master *master; 690 struct spi_master *master;
689 struct resource mem; 691 struct resource mem;
690 struct resource irq; 692 unsigned int irq;
691 int ret = -ENOMEM; 693 int ret = -ENOMEM;
692 694
693 ret = of_mpc8xxx_spi_probe(ofdev); 695 ret = of_mpc8xxx_spi_probe(ofdev);
@@ -702,13 +704,13 @@ static int of_fsl_espi_probe(struct platform_device *ofdev)
702 if (ret) 704 if (ret)
703 goto err; 705 goto err;
704 706
705 ret = of_irq_to_resource(np, 0, &irq); 707 irq = irq_of_parse_and_map(np, 0);
706 if (!ret) { 708 if (!ret) {
707 ret = -EINVAL; 709 ret = -EINVAL;
708 goto err; 710 goto err;
709 } 711 }
710 712
711 master = fsl_espi_probe(dev, &mem, irq.start); 713 master = fsl_espi_probe(dev, &mem, irq);
712 if (IS_ERR(master)) { 714 if (IS_ERR(master)) {
713 ret = PTR_ERR(master); 715 ret = PTR_ERR(master);
714 goto err; 716 goto err;