Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303322
b: refs/heads/master
c: dffa27e
h: refs/heads/master
v: v3
  • Loading branch information
Shawn Guo committed May 12, 2012
1 parent f8bcfe3 commit 3d02f40
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15afbc68780f8c06c5b5590adcbf7534ee1920b3
refs/heads/master: dffa27e7a8626ed2d64f027b0f844fe6fe438c11
8 changes: 8 additions & 0 deletions trunk/drivers/spi/spi-imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_gpio.h>
#include <linux/pinctrl/consumer.h>

#include <mach/spi.h>

Expand Down Expand Up @@ -758,6 +759,7 @@ static int __devinit spi_imx_probe(struct platform_device *pdev)
struct spi_master *master;
struct spi_imx_data *spi_imx;
struct resource *res;
struct pinctrl *pinctrl;
int i, ret, num_cs;

if (!np && !mxc_platform_info) {
Expand Down Expand Up @@ -845,6 +847,12 @@ static int __devinit spi_imx_probe(struct platform_device *pdev)
goto out_iounmap;
}

pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
if (IS_ERR(pinctrl)) {
ret = PTR_ERR(pinctrl);
goto out_free_irq;
}

spi_imx->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(spi_imx->clk)) {
dev_err(&pdev->dev, "unable to get clock\n");
Expand Down

0 comments on commit 3d02f40

Please sign in to comment.