aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-mxs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-mxs.c')
-rw-r--r--drivers/i2c/busses/i2c-mxs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 76b8af44f63..7fa73eed84a 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -26,6 +26,7 @@
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27#include <linux/jiffies.h> 27#include <linux/jiffies.h>
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/pinctrl/consumer.h>
29 30
30#include <mach/common.h> 31#include <mach/common.h>
31 32
@@ -325,10 +326,15 @@ static int __devinit mxs_i2c_probe(struct platform_device *pdev)
325 struct device *dev = &pdev->dev; 326 struct device *dev = &pdev->dev;
326 struct mxs_i2c_dev *i2c; 327 struct mxs_i2c_dev *i2c;
327 struct i2c_adapter *adap; 328 struct i2c_adapter *adap;
329 struct pinctrl *pinctrl;
328 struct resource *res; 330 struct resource *res;
329 resource_size_t res_size; 331 resource_size_t res_size;
330 int err, irq; 332 int err, irq;
331 333
334 pinctrl = devm_pinctrl_get_select_default(dev);
335 if (IS_ERR(pinctrl))
336 return PTR_ERR(pinctrl);
337
332 i2c = devm_kzalloc(dev, sizeof(struct mxs_i2c_dev), GFP_KERNEL); 338 i2c = devm_kzalloc(dev, sizeof(struct mxs_i2c_dev), GFP_KERNEL);
333 if (!i2c) 339 if (!i2c)
334 return -ENOMEM; 340 return -ENOMEM;