i2c-qup: Remove probe failure when msm_i2c_config_gpio is not defined
This avoids empty functions being defined in the boards file. Signed-off-by: Harini Jayaraman <harinij@codeaurora.org>
This commit is contained in:
committed by
Bryan Huntsman
parent
505df9cb23
commit
ce67cf8ea3
@@ -1018,12 +1018,6 @@ qup_i2c_probe(struct platform_device *pdev)
|
|||||||
} else
|
} else
|
||||||
pclk = NULL;
|
pclk = NULL;
|
||||||
|
|
||||||
if (!(pdata->msm_i2c_config_gpio)) {
|
|
||||||
dev_err(&pdev->dev, "config_gpio function not initialized\n");
|
|
||||||
ret = -ENOSYS;
|
|
||||||
goto err_config_failed;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We support frequencies upto FAST Mode(400KHz) */
|
/* We support frequencies upto FAST Mode(400KHz) */
|
||||||
if (pdata->clk_freq <= 0 ||
|
if (pdata->clk_freq <= 0 ||
|
||||||
pdata->clk_freq > 400000) {
|
pdata->clk_freq > 400000) {
|
||||||
@@ -1134,7 +1128,8 @@ qup_i2c_probe(struct platform_device *pdev)
|
|||||||
"QUP I2C adapter",
|
"QUP I2C adapter",
|
||||||
sizeof(dev->adapter.name));
|
sizeof(dev->adapter.name));
|
||||||
dev->adapter.nr = pdev->id;
|
dev->adapter.nr = pdev->id;
|
||||||
pdata->msm_i2c_config_gpio(dev->adapter.nr, 1);
|
if (pdata->msm_i2c_config_gpio)
|
||||||
|
pdata->msm_i2c_config_gpio(dev->adapter.nr, 1);
|
||||||
|
|
||||||
dev->suspended = 0;
|
dev->suspended = 0;
|
||||||
mutex_init(&dev->mlock);
|
mutex_init(&dev->mlock);
|
||||||
|
|||||||
Reference in New Issue
Block a user