diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2015-10-29 15:00:21 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2015-12-26 14:50:36 +0100 |
commit | a21e19829c50d9889a83faf00fc93be174314cdb (patch) | |
tree | f6dfec4b3afba59efb44c13023201523365ccb19 | |
parent | 27d029fd2bf6426dd0a3cd5d62d85d4e1f6762d4 (diff) |
max9526.c: move pinctrl after i2c detect
This removes a bunch of error messages during probe because both
the adv7180 and the max9526 use try to reserve the same pins.
While at it convert debug output to dev_dbg
-rw-r--r-- | drivers/media/platform/mxc/capture/max9526.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/media/platform/mxc/capture/max9526.c b/drivers/media/platform/mxc/capture/max9526.c index 6f6ed9559949..06242b727ca2 100644 --- a/drivers/media/platform/mxc/capture/max9526.c +++ b/drivers/media/platform/mxc/capture/max9526.c @@ -987,20 +987,7 @@ static int max9526_probe(struct i2c_client *client, struct pinctrl *pinctrl; struct device *dev = &client->dev; - printk(KERN_ERR"DBG sensor data is at %p\n", &max9526_data); - - /* MAX9526 pinctrl */ - pinctrl = devm_pinctrl_get_select_default(dev); - if (IS_ERR(pinctrl)) { - dev_err(dev, "setup pinctrl failed\n"); - return PTR_ERR(pinctrl); - } - - max9526_regulator_enable(dev); - - max9526_power_down(0); - - msleep(1); + dev_dbg(dev, "%s sensor data is at %p\n", __func__, &max9526_data); /* Set initial values for the sensor struct. */ memset(&max9526_data, 0, sizeof(max9526_data)); @@ -1063,6 +1050,19 @@ static int max9526_probe(struct i2c_client *client, } } + /* MAX9526 pinctrl */ + pinctrl = devm_pinctrl_get_select_default(dev); + if (IS_ERR(pinctrl)) { + dev_err(dev, "setup pinctrl failed\n"); + return PTR_ERR(pinctrl); + } + + max9526_regulator_enable(dev); + + max9526_power_down(0); + + msleep(1); + /*! MAX9526 initialization. */ max9526_hard_reset(); |