summaryrefslogtreecommitdiffstats
path: root/drivers/net/can
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-05-06 20:25:13 +0800
committerShawn Guo <shawn.guo@linaro.org>2012-05-12 09:43:09 +0800
commita53157c21c699c392921e243fa96abc27722f910 (patch)
tree5298e54022a20e86ef7fb5b782c131890cc231b8 /drivers/net/can
parentb2bccee1793ebcf47272fc6556e741a9fba896c7 (diff)
downloadlinux-a53157c21c699c392921e243fa96abc27722f910.tar.bz2
can: flexcan: adopt pinctrl support
Cc: linux-can@vger.kernel.org Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/flexcan.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 1efb08386c61..38c0690df5c8 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -35,6 +35,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
+#include <linux/pinctrl/consumer.h>
#define DRV_NAME "flexcan"
@@ -927,11 +928,16 @@ static int __devinit flexcan_probe(struct platform_device *pdev)
struct flexcan_priv *priv;
struct resource *mem;
struct clk *clk = NULL;
+ struct pinctrl *pinctrl;
void __iomem *base;
resource_size_t mem_size;
int err, irq;
u32 clock_freq = 0;
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ if (IS_ERR(pinctrl))
+ return PTR_ERR(pinctrl);
+
if (pdev->dev.of_node) {
const u32 *clock_freq_p;