msm_fb: display: Fix D2L register I2C driver more than once

Fix error message seen on kernel log after suspend/resume

Change-Id: I908efec9fde6e9de838e28d2c778fa4b3567e4f6
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
This commit is contained in:
Amir Samuelov 2012-06-12 17:52:12 +03:00 committed by Stephen Boyd
parent 9e91b7d849
commit 987d4f11e5

View file

@ -574,7 +574,8 @@ static int mipi_d2l_lcd_on(struct platform_device *pdev)
mipi_d2l_enable_3d(mfd, false, false);
/* Add I2C driver only after DSI-CLK is running */
i2c_add_driver(&d2l_i2c_slave_driver);
if (d2l_i2c_client == NULL)
i2c_add_driver(&d2l_i2c_slave_driver);
pr_info("%s.ret=%d.\n", __func__, ret);
@ -989,6 +990,8 @@ static int mipi_d2l_init(void)
{
pr_debug("%s.\n", __func__);
d2l_i2c_client = NULL;
return platform_driver_register(&d2l_driver);
}