diff options
author | Arnab Basu <abasu@nvidia.com> | 2015-07-01 02:25:29 -0400 |
---|---|---|
committer | Mudit Jain <muditj@nvidia.com> | 2018-07-13 06:41:37 -0400 |
commit | 2ea9aee05d545d7dabe7e7f66d25adaf876b8555 (patch) | |
tree | dfc4e381622af5ec540eba9f6f7f25487e7c045c /drivers/i2c | |
parent | 0426c194057fb1cc045af847f71b7edfce2a6eb8 (diff) |
i2c-tegra-hv: Move call to add_numbered_adapter to end of probe
In kernel-3.18 the kernel thinks that the i2c adapter is
ready to be used as soon as i2c_add_numbered_adapter is
called. So we need to make sure that this is our last call
in probe.
Bug 200119646
VFND-202
Change-Id: I915e47dfb6c9efe0ac119b593656c809611ed23c
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/764787
Reviewed-on: http://git-master/r/1198240
Reviewed-on: http://git-master/r/1314818
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-tegra-hv.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-tegra-hv.c b/drivers/i2c/busses/i2c-tegra-hv.c index 1f0170d96..58fb624a5 100644 --- a/drivers/i2c/busses/i2c-tegra-hv.c +++ b/drivers/i2c/busses/i2c-tegra-hv.c | |||
@@ -257,11 +257,6 @@ static int tegra_hv_i2c_probe(struct platform_device *pdev) | |||
257 | else | 257 | else |
258 | i2c_dev->completion_timeout = TEGRA_I2C_TIMEOUT; | 258 | i2c_dev->completion_timeout = TEGRA_I2C_TIMEOUT; |
259 | 259 | ||
260 | ret = i2c_add_numbered_adapter(&i2c_dev->adapter); | ||
261 | if (ret) { | ||
262 | dev_err(&pdev->dev, "Failed to add I2C adapter\n"); | ||
263 | return ret; | ||
264 | } | ||
265 | i2c_dev->base = res->start; | 260 | i2c_dev->base = res->start; |
266 | init_completion(&i2c_dev->msg_complete); | 261 | init_completion(&i2c_dev->msg_complete); |
267 | 262 | ||
@@ -297,6 +292,12 @@ static int tegra_hv_i2c_probe(struct platform_device *pdev) | |||
297 | } | 292 | } |
298 | } | 293 | } |
299 | 294 | ||
295 | ret = i2c_add_numbered_adapter(&i2c_dev->adapter); | ||
296 | if (ret) { | ||
297 | dev_err(&pdev->dev, "Failed to add I2C adapter\n"); | ||
298 | return ret; | ||
299 | } | ||
300 | |||
300 | return 0; | 301 | return 0; |
301 | } | 302 | } |
302 | 303 | ||