diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-11-22 07:36:18 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-12-21 04:01:40 -0500 |
commit | 9e3b6b99075a01ce47379eee74365aece14242f3 (patch) | |
tree | b6f5253ed96d089d9bad54601cc2a08cceeafd9c /drivers/gpu/drm/nouveau/nouveau_i2c.c | |
parent | 2bdb06e3cff066c546fb41152bc582a5ec73e899 (diff) |
drm/nouveau/i2c: fix debug message
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_i2c.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_i2c.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.c b/drivers/gpu/drm/nouveau/nouveau_i2c.c index d0d581440d5e..116ef3193fc7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_i2c.c +++ b/drivers/gpu/drm/nouveau/nouveau_i2c.c | |||
@@ -375,9 +375,13 @@ nouveau_i2c_identify(struct drm_device *dev, const char *what, | |||
375 | struct nouveau_i2c_chan *i2c = nouveau_i2c_find(dev, index); | 375 | struct nouveau_i2c_chan *i2c = nouveau_i2c_find(dev, index); |
376 | int i; | 376 | int i; |
377 | 377 | ||
378 | NV_DEBUG(dev, "Probing %ss on I2C bus: %d\n", what, index); | 378 | if (!i2c) { |
379 | NV_DEBUG(dev, "No bus when probing %s on %d\n", what, index); | ||
380 | return -ENODEV; | ||
381 | } | ||
379 | 382 | ||
380 | for (i = 0; i2c && info[i].addr; i++) { | 383 | NV_DEBUG(dev, "Probing %ss on I2C bus: %d\n", what, i2c->index); |
384 | for (i = 0; info[i].addr; i++) { | ||
381 | if (nouveau_probe_i2c_addr(i2c, info[i].addr) && | 385 | if (nouveau_probe_i2c_addr(i2c, info[i].addr) && |
382 | (!match || match(i2c, &info[i]))) { | 386 | (!match || match(i2c, &info[i]))) { |
383 | NV_INFO(dev, "Detected %s: %s\n", what, info[i].type); | 387 | NV_INFO(dev, "Detected %s: %s\n", what, info[i].type); |
@@ -386,6 +390,5 @@ nouveau_i2c_identify(struct drm_device *dev, const char *what, | |||
386 | } | 390 | } |
387 | 391 | ||
388 | NV_DEBUG(dev, "No devices found.\n"); | 392 | NV_DEBUG(dev, "No devices found.\n"); |
389 | |||
390 | return -ENODEV; | 393 | return -ENODEV; |
391 | } | 394 | } |