diff options
author | Mark Brown <broonie@linaro.org> | 2013-06-26 11:20:57 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-26 11:20:57 -0400 |
commit | 2924f096a816367c80cefc05036d8e9f5bd68f6c (patch) | |
tree | 62d22bdf27dc8834b5b0e7beef4f50ce52243ea4 | |
parent | 4581949d522f22d0d9ab710b4a7253754349f5d8 (diff) | |
parent | 4a577f5275e948f96ea1a9bbce5d994ec6db618b (diff) |
Merge remote-tracking branch 'spi/topic/coldfire-qspi' into spi-next
-rw-r--r-- | drivers/spi/spi-coldfire-qspi.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c index 9a7db9d1b4ca..15cda45afec6 100644 --- a/drivers/spi/spi-coldfire-qspi.c +++ b/drivers/spi/spi-coldfire-qspi.c | |||
@@ -400,6 +400,12 @@ static int mcfqspi_probe(struct platform_device *pdev) | |||
400 | struct mcfqspi_platform_data *pdata; | 400 | struct mcfqspi_platform_data *pdata; |
401 | int status; | 401 | int status; |
402 | 402 | ||
403 | pdata = pdev->dev.platform_data; | ||
404 | if (!pdata) { | ||
405 | dev_dbg(&pdev->dev, "platform data is missing\n"); | ||
406 | return -ENOENT; | ||
407 | } | ||
408 | |||
403 | master = spi_alloc_master(&pdev->dev, sizeof(*mcfqspi)); | 409 | master = spi_alloc_master(&pdev->dev, sizeof(*mcfqspi)); |
404 | if (master == NULL) { | 410 | if (master == NULL) { |
405 | dev_dbg(&pdev->dev, "spi_alloc_master failed\n"); | 411 | dev_dbg(&pdev->dev, "spi_alloc_master failed\n"); |
@@ -450,11 +456,6 @@ static int mcfqspi_probe(struct platform_device *pdev) | |||
450 | } | 456 | } |
451 | clk_enable(mcfqspi->clk); | 457 | clk_enable(mcfqspi->clk); |
452 | 458 | ||
453 | pdata = pdev->dev.platform_data; | ||
454 | if (!pdata) { | ||
455 | dev_dbg(&pdev->dev, "platform data is missing\n"); | ||
456 | goto fail4; | ||
457 | } | ||
458 | master->bus_num = pdata->bus_num; | 459 | master->bus_num = pdata->bus_num; |
459 | master->num_chipselect = pdata->num_chipselect; | 460 | master->num_chipselect = pdata->num_chipselect; |
460 | 461 | ||