Skip to contentSkip to conversation

savagefb: Replace magic register address with define

PATCH In review Tormod Volden 2 participants 2 messages Apr 3, 2011 – Apr 6, 2011 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 savagefb: Replace magic register address with define

From: Tormod Volden <[email protected]>

MM_SERIAL1 was already defined, but not used.

---

Hi,

There was this unused define, and the one single use of the constant, so I think somebody just forgot to use it.

Regards,
Tormod

 drivers/video/savage/savagefb-i2c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/savage/savagefb-i2c.c +1 -1
index b16e613..58c8a3c 100644
@@ -191,7 +191,7 @@ void savagefb_create_i2c_busses(struct fb_info *info)
 		par->chan.algo.getscl = prosavage_gpio_getscl;
 		break;
 	case FB_ACCEL_SAVAGE2000:
-		par->chan.reg         = 0xff20;
+		par->chan.reg         = MM_SERIAL1;
 		par->chan.ioaddr      = par->mmio.vbase;
 		par->chan.algo.setsda = savage4_gpio_setsda;
 		par->chan.algo.setscl = savage4_gpio_setscl;
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 3 lines · Tormod Volden

MM_SERIAL1 was already defined, but not used.

Quoted 7 lines · Tormod Volden

In practice this means enabling I2C (for DDC2) on all prosavage cards, like the xorg ddx does. The savage4 and savage2000 families have only one member each, so there is no change for those.

Tested on TwisterK.

Quoted 4 lines · Tormod Volden

The else clause was not needed after the cleanup in commit b8901b091db260b0f0101d6395ce5c6016835a47

These all look fine. All applied, thanks.