Commit 076a7dce authored by Antonino A. Daplas's avatar Antonino A. Daplas Committed by Linus Torvalds

nvidiafb: Correctly assign the i2c class with the port reversal

If the i2c ports are to be reversed, I2C_CLASS_HWMON assignment must also be
reversed.
Signed-off-by: default avatarAntonino Daplas <adaplas@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e400b6ec
...@@ -126,10 +126,12 @@ void nvidia_create_i2c_busses(struct nvidia_par *par) ...@@ -126,10 +126,12 @@ void nvidia_create_i2c_busses(struct nvidia_par *par)
par->chan[2].par = par; par->chan[2].par = par;
par->chan[0].ddc_base = (par->reverse_i2c) ? 0x36 : 0x3e; par->chan[0].ddc_base = (par->reverse_i2c) ? 0x36 : 0x3e;
nvidia_setup_i2c_bus(&par->chan[0], "nvidia #0", 0); nvidia_setup_i2c_bus(&par->chan[0], "nvidia #0",
(par->reverse_i2c) ? I2C_CLASS_HWMON : 0);
par->chan[1].ddc_base = (par->reverse_i2c) ? 0x3e : 0x36; par->chan[1].ddc_base = (par->reverse_i2c) ? 0x3e : 0x36;
nvidia_setup_i2c_bus(&par->chan[1], "nvidia #1", I2C_CLASS_HWMON); nvidia_setup_i2c_bus(&par->chan[1], "nvidia #1",
(par->reverse_i2c) ? 0 : I2C_CLASS_HWMON);
par->chan[2].ddc_base = 0x50; par->chan[2].ddc_base = 0x50;
nvidia_setup_i2c_bus(&par->chan[2], "nvidia #2", 0); nvidia_setup_i2c_bus(&par->chan[2], "nvidia #2", 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment