diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-06 15:29:58 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-13 10:14:58 -0400 |
commit | de1f9f270ea7fb7af37e1b62580e27b15273d63d (patch) | |
tree | 8de3073467d3e08448e575e6b534fc07956acf7b /drivers/spi/spi-sirf.c | |
parent | f722406faae2d073cc1d01063d1123c35425939e (diff) |
spi/sirf: Let device core handle pinctrl
Since commit ab78029 (drivers/pinctrl: grab default handles from device
core) we can rely on device core for handling pinctrl so remove
devm_pinctrl_get_select_default() from the driver.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Barry Song <baohua.song@csr.com>
Diffstat (limited to 'drivers/spi/spi-sirf.c')
-rw-r--r-- | drivers/spi/spi-sirf.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c index 0808cd56bf8d..ac2ea8a1bd65 100644 --- a/drivers/spi/spi-sirf.c +++ b/drivers/spi/spi-sirf.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/of_gpio.h> | 19 | #include <linux/of_gpio.h> |
20 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
21 | #include <linux/spi/spi_bitbang.h> | 21 | #include <linux/spi/spi_bitbang.h> |
22 | #include <linux/pinctrl/consumer.h> | ||
23 | 22 | ||
24 | #define DRIVER_NAME "sirfsoc_spi" | 23 | #define DRIVER_NAME "sirfsoc_spi" |
25 | 24 | ||
@@ -127,7 +126,6 @@ struct sirfsoc_spi { | |||
127 | void __iomem *base; | 126 | void __iomem *base; |
128 | u32 ctrl_freq; /* SPI controller clock speed */ | 127 | u32 ctrl_freq; /* SPI controller clock speed */ |
129 | struct clk *clk; | 128 | struct clk *clk; |
130 | struct pinctrl *p; | ||
131 | 129 | ||
132 | /* rx & tx bufs from the spi_transfer */ | 130 | /* rx & tx bufs from the spi_transfer */ |
133 | const void *tx; | 131 | const void *tx; |
@@ -558,15 +556,10 @@ static int spi_sirfsoc_probe(struct platform_device *pdev) | |||
558 | master->bus_num = pdev->id; | 556 | master->bus_num = pdev->id; |
559 | sspi->bitbang.master->dev.of_node = pdev->dev.of_node; | 557 | sspi->bitbang.master->dev.of_node = pdev->dev.of_node; |
560 | 558 | ||
561 | sspi->p = pinctrl_get_select_default(&pdev->dev); | ||
562 | ret = IS_ERR(sspi->p); | ||
563 | if (ret) | ||
564 | goto free_master; | ||
565 | |||
566 | sspi->clk = clk_get(&pdev->dev, NULL); | 559 | sspi->clk = clk_get(&pdev->dev, NULL); |
567 | if (IS_ERR(sspi->clk)) { | 560 | if (IS_ERR(sspi->clk)) { |
568 | ret = -EINVAL; | 561 | ret = -EINVAL; |
569 | goto free_pin; | 562 | goto free_master; |
570 | } | 563 | } |
571 | clk_prepare_enable(sspi->clk); | 564 | clk_prepare_enable(sspi->clk); |
572 | sspi->ctrl_freq = clk_get_rate(sspi->clk); | 565 | sspi->ctrl_freq = clk_get_rate(sspi->clk); |
@@ -594,8 +587,6 @@ static int spi_sirfsoc_probe(struct platform_device *pdev) | |||
594 | free_clk: | 587 | free_clk: |
595 | clk_disable_unprepare(sspi->clk); | 588 | clk_disable_unprepare(sspi->clk); |
596 | clk_put(sspi->clk); | 589 | clk_put(sspi->clk); |
597 | free_pin: | ||
598 | pinctrl_put(sspi->p); | ||
599 | free_master: | 590 | free_master: |
600 | spi_master_put(master); | 591 | spi_master_put(master); |
601 | err_cs: | 592 | err_cs: |
@@ -618,7 +609,6 @@ static int spi_sirfsoc_remove(struct platform_device *pdev) | |||
618 | } | 609 | } |
619 | clk_disable_unprepare(sspi->clk); | 610 | clk_disable_unprepare(sspi->clk); |
620 | clk_put(sspi->clk); | 611 | clk_put(sspi->clk); |
621 | pinctrl_put(sspi->p); | ||
622 | spi_master_put(master); | 612 | spi_master_put(master); |
623 | return 0; | 613 | return 0; |
624 | } | 614 | } |