From: Antonino A. Daplas Date: Tue, 16 Oct 2007 08:29:36 +0000 (-0700) Subject: nvidiafb: Correctly assign the i2c class with the port reversal X-Git-Tag: v2.6.24-rc1~873 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=076a7dce9ac3d89ef7215eecc1230177891383bd;p=linux-2.6-omap-h63xx.git 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: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/nvidia/nv_i2c.c b/drivers/video/nvidia/nv_i2c.c index 0cbcb3d833f..6fd7cb8f9b8 100644 --- a/drivers/video/nvidia/nv_i2c.c +++ b/drivers/video/nvidia/nv_i2c.c @@ -126,10 +126,12 @@ void nvidia_create_i2c_busses(struct nvidia_par *par) par->chan[2].par = par; 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; - 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; nvidia_setup_i2c_bus(&par->chan[2], "nvidia #2", 0);