diff options
Diffstat (limited to 'drivers/video/savage/savagefb-i2c.c')
-rw-r--r-- | drivers/video/savage/savagefb-i2c.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c index b16e6138fdd4..bb71fea07284 100644 --- a/drivers/video/savage/savagefb-i2c.c +++ b/drivers/video/savage/savagefb-i2c.c | |||
@@ -159,8 +159,7 @@ static int savage_setup_i2c_bus(struct savagefb_i2c_chan *chan, | |||
159 | else | 159 | else |
160 | dev_warn(&chan->par->pcidev->dev, | 160 | dev_warn(&chan->par->pcidev->dev, |
161 | "Failed to register I2C bus %s.\n", name); | 161 | "Failed to register I2C bus %s.\n", name); |
162 | } else | 162 | } |
163 | chan->par = NULL; | ||
164 | 163 | ||
165 | return rc; | 164 | return rc; |
166 | } | 165 | } |
@@ -170,9 +169,8 @@ void savagefb_create_i2c_busses(struct fb_info *info) | |||
170 | struct savagefb_par *par = info->par; | 169 | struct savagefb_par *par = info->par; |
171 | par->chan.par = par; | 170 | par->chan.par = par; |
172 | 171 | ||
173 | switch(info->fix.accel) { | 172 | switch (par->chip) { |
174 | case FB_ACCEL_PROSAVAGE_DDRK: | 173 | case S3_PROSAVAGE: |
175 | case FB_ACCEL_PROSAVAGE_PM: | ||
176 | par->chan.reg = CR_SERIAL2; | 174 | par->chan.reg = CR_SERIAL2; |
177 | par->chan.ioaddr = par->mmio.vbase; | 175 | par->chan.ioaddr = par->mmio.vbase; |
178 | par->chan.algo.setsda = prosavage_gpio_setsda; | 176 | par->chan.algo.setsda = prosavage_gpio_setsda; |
@@ -180,7 +178,7 @@ void savagefb_create_i2c_busses(struct fb_info *info) | |||
180 | par->chan.algo.getsda = prosavage_gpio_getsda; | 178 | par->chan.algo.getsda = prosavage_gpio_getsda; |
181 | par->chan.algo.getscl = prosavage_gpio_getscl; | 179 | par->chan.algo.getscl = prosavage_gpio_getscl; |
182 | break; | 180 | break; |
183 | case FB_ACCEL_SAVAGE4: | 181 | case S3_SAVAGE4: |
184 | par->chan.reg = CR_SERIAL1; | 182 | par->chan.reg = CR_SERIAL1; |
185 | if (par->pcidev->revision > 1 && !(VGArCR(0xa6, par) & 0x40)) | 183 | if (par->pcidev->revision > 1 && !(VGArCR(0xa6, par) & 0x40)) |
186 | par->chan.reg = CR_SERIAL2; | 184 | par->chan.reg = CR_SERIAL2; |
@@ -190,8 +188,8 @@ void savagefb_create_i2c_busses(struct fb_info *info) | |||
190 | par->chan.algo.getsda = prosavage_gpio_getsda; | 188 | par->chan.algo.getsda = prosavage_gpio_getsda; |
191 | par->chan.algo.getscl = prosavage_gpio_getscl; | 189 | par->chan.algo.getscl = prosavage_gpio_getscl; |
192 | break; | 190 | break; |
193 | case FB_ACCEL_SAVAGE2000: | 191 | case S3_SAVAGE2000: |
194 | par->chan.reg = 0xff20; | 192 | par->chan.reg = MM_SERIAL1; |
195 | par->chan.ioaddr = par->mmio.vbase; | 193 | par->chan.ioaddr = par->mmio.vbase; |
196 | par->chan.algo.setsda = savage4_gpio_setsda; | 194 | par->chan.algo.setsda = savage4_gpio_setsda; |
197 | par->chan.algo.setscl = savage4_gpio_setscl; | 195 | par->chan.algo.setscl = savage4_gpio_setscl; |