diff options
author | Jean Delvare <khali@linux-fr.org> | 2007-05-08 03:38:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:28 -0400 |
commit | a65ff76ac8b24df49bbf4acc38918fb52d1033b0 (patch) | |
tree | 4bd323a77da9e709267d1712e4424a2db155aab9 /drivers/video/riva/fbdev.c | |
parent | 5b358fe12f03a7822db6f376b608f996c664a952 (diff) |
rivafb/nvidiafb: Various cleanups
Various cleanups to rivafb/nvidiafb's I2C code:
* Drop useless par->bus.
* Refactor I2C bus deletion code.
* Drop useless variable initialization.
* Remove unneeded include of <linux/i2c-id.h>.
* Simplify +1/-1.
* Add __devinit tags where possible.
[adaplas]
The varible initialization are not useless. However, rivafb must
check if i2c bus are created properly before reading the EDID
block.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/riva/fbdev.c')
-rw-r--r-- | drivers/video/riva/fbdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index b8d50f178ad5..9e6ee1ffd9f3 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c | |||
@@ -1788,10 +1788,10 @@ static int __devinit riva_get_EDID_i2c(struct fb_info *info) | |||
1788 | 1788 | ||
1789 | NVTRACE_ENTER(); | 1789 | NVTRACE_ENTER(); |
1790 | riva_create_i2c_busses(par); | 1790 | riva_create_i2c_busses(par); |
1791 | for (i = 0; i < par->bus; i++) { | 1791 | for (i = 0; i < 3; i++) { |
1792 | if (!par->chan[i].par) | 1792 | if (!par->chan[i].par) |
1793 | continue; | 1793 | continue; |
1794 | riva_probe_i2c_connector(par, i+1, &par->EDID); | 1794 | riva_probe_i2c_connector(par, i, &par->EDID); |
1795 | if (par->EDID && !fb_parse_edid(par->EDID, &var)) { | 1795 | if (par->EDID && !fb_parse_edid(par->EDID, &var)) { |
1796 | printk(PFX "Found EDID Block from BUS %i\n", i); | 1796 | printk(PFX "Found EDID Block from BUS %i\n", i); |
1797 | break; | 1797 | break; |