diff options
Diffstat (limited to 'drivers/video/matrox/matroxfb_maven.c')
-rw-r--r-- | drivers/video/matrox/matroxfb_maven.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c index 042408a8c631..4fbb386b2eff 100644 --- a/drivers/video/matrox/matroxfb_maven.c +++ b/drivers/video/matrox/matroxfb_maven.c | |||
@@ -460,7 +460,7 @@ static void maven_init_TVdata(const struct maven_data* md, struct mavenregs* dat | |||
460 | }, MATROXFB_OUTPUT_MODE_NTSC, 525, 60 }; | 460 | }, MATROXFB_OUTPUT_MODE_NTSC, 525, 60 }; |
461 | MINFO_FROM(md->primary_head); | 461 | MINFO_FROM(md->primary_head); |
462 | 462 | ||
463 | if (ACCESS_FBINFO(outputs[1]).mode == MATROXFB_OUTPUT_MODE_PAL) | 463 | if (minfo->outputs[1].mode == MATROXFB_OUTPUT_MODE_PAL) |
464 | *data = palregs; | 464 | *data = palregs; |
465 | else | 465 | else |
466 | *data = ntscregs; | 466 | *data = ntscregs; |
@@ -496,11 +496,11 @@ static void maven_init_TVdata(const struct maven_data* md, struct mavenregs* dat | |||
496 | /* Set saturation */ | 496 | /* Set saturation */ |
497 | { | 497 | { |
498 | data->regs[0x20] = | 498 | data->regs[0x20] = |
499 | data->regs[0x22] = ACCESS_FBINFO(altout.tvo_params.saturation); | 499 | data->regs[0x22] = minfo->altout.tvo_params.saturation; |
500 | } | 500 | } |
501 | 501 | ||
502 | /* Set HUE */ | 502 | /* Set HUE */ |
503 | data->regs[0x25] = ACCESS_FBINFO(altout.tvo_params.hue); | 503 | data->regs[0x25] = minfo->altout.tvo_params.hue; |
504 | return; | 504 | return; |
505 | } | 505 | } |
506 | 506 | ||
@@ -743,7 +743,7 @@ static inline int maven_compute_timming(struct maven_data* md, | |||
743 | unsigned int a, bv, c; | 743 | unsigned int a, bv, c; |
744 | MINFO_FROM(md->primary_head); | 744 | MINFO_FROM(md->primary_head); |
745 | 745 | ||
746 | m->mode = ACCESS_FBINFO(outputs[1]).mode; | 746 | m->mode = minfo->outputs[1].mode; |
747 | if (m->mode != MATROXFB_OUTPUT_MODE_MONITOR) { | 747 | if (m->mode != MATROXFB_OUTPUT_MODE_MONITOR) { |
748 | unsigned int lmargin; | 748 | unsigned int lmargin; |
749 | unsigned int umargin; | 749 | unsigned int umargin; |
@@ -1132,7 +1132,7 @@ static int maven_get_control (struct maven_data* md, | |||
1132 | static int maven_out_compute(void* md, struct my_timming* mt) { | 1132 | static int maven_out_compute(void* md, struct my_timming* mt) { |
1133 | #define mdinfo ((struct maven_data*)md) | 1133 | #define mdinfo ((struct maven_data*)md) |
1134 | #define minfo (mdinfo->primary_head) | 1134 | #define minfo (mdinfo->primary_head) |
1135 | return maven_compute_timming(md, mt, &ACCESS_FBINFO(hw).maven); | 1135 | return maven_compute_timming(md, mt, &minfo->hw.maven); |
1136 | #undef minfo | 1136 | #undef minfo |
1137 | #undef mdinfo | 1137 | #undef mdinfo |
1138 | } | 1138 | } |
@@ -1140,7 +1140,7 @@ static int maven_out_compute(void* md, struct my_timming* mt) { | |||
1140 | static int maven_out_program(void* md) { | 1140 | static int maven_out_program(void* md) { |
1141 | #define mdinfo ((struct maven_data*)md) | 1141 | #define mdinfo ((struct maven_data*)md) |
1142 | #define minfo (mdinfo->primary_head) | 1142 | #define minfo (mdinfo->primary_head) |
1143 | return maven_program_timming(md, &ACCESS_FBINFO(hw).maven); | 1143 | return maven_program_timming(md, &minfo->hw.maven); |
1144 | #undef minfo | 1144 | #undef minfo |
1145 | #undef mdinfo | 1145 | #undef mdinfo |
1146 | } | 1146 | } |
@@ -1186,14 +1186,14 @@ static int maven_init_client(struct i2c_client* clnt) { | |||
1186 | struct maven_data* md = i2c_get_clientdata(clnt); | 1186 | struct maven_data* md = i2c_get_clientdata(clnt); |
1187 | MINFO_FROM(container_of(clnt->adapter, struct i2c_bit_adapter, adapter)->minfo); | 1187 | MINFO_FROM(container_of(clnt->adapter, struct i2c_bit_adapter, adapter)->minfo); |
1188 | 1188 | ||
1189 | md->primary_head = MINFO; | 1189 | md->primary_head = minfo; |
1190 | md->client = clnt; | 1190 | md->client = clnt; |
1191 | down_write(&ACCESS_FBINFO(altout.lock)); | 1191 | down_write(&minfo->altout.lock); |
1192 | ACCESS_FBINFO(outputs[1]).output = &maven_altout; | 1192 | minfo->outputs[1].output = &maven_altout; |
1193 | ACCESS_FBINFO(outputs[1]).src = ACCESS_FBINFO(outputs[1]).default_src; | 1193 | minfo->outputs[1].src = minfo->outputs[1].default_src; |
1194 | ACCESS_FBINFO(outputs[1]).data = md; | 1194 | minfo->outputs[1].data = md; |
1195 | ACCESS_FBINFO(outputs[1]).mode = MATROXFB_OUTPUT_MODE_MONITOR; | 1195 | minfo->outputs[1].mode = MATROXFB_OUTPUT_MODE_MONITOR; |
1196 | up_write(&ACCESS_FBINFO(altout.lock)); | 1196 | up_write(&minfo->altout.lock); |
1197 | if (maven_get_reg(clnt, 0xB2) < 0x14) { | 1197 | if (maven_get_reg(clnt, 0xB2) < 0x14) { |
1198 | md->version = MGATVO_B; | 1198 | md->version = MGATVO_B; |
1199 | /* Tweak some things for this old chip */ | 1199 | /* Tweak some things for this old chip */ |
@@ -1220,12 +1220,12 @@ static int maven_shutdown_client(struct i2c_client* clnt) { | |||
1220 | if (md->primary_head) { | 1220 | if (md->primary_head) { |
1221 | MINFO_FROM(md->primary_head); | 1221 | MINFO_FROM(md->primary_head); |
1222 | 1222 | ||
1223 | down_write(&ACCESS_FBINFO(altout.lock)); | 1223 | down_write(&minfo->altout.lock); |
1224 | ACCESS_FBINFO(outputs[1]).src = MATROXFB_SRC_NONE; | 1224 | minfo->outputs[1].src = MATROXFB_SRC_NONE; |
1225 | ACCESS_FBINFO(outputs[1]).output = NULL; | 1225 | minfo->outputs[1].output = NULL; |
1226 | ACCESS_FBINFO(outputs[1]).data = NULL; | 1226 | minfo->outputs[1].data = NULL; |
1227 | ACCESS_FBINFO(outputs[1]).mode = MATROXFB_OUTPUT_MODE_MONITOR; | 1227 | minfo->outputs[1].mode = MATROXFB_OUTPUT_MODE_MONITOR; |
1228 | up_write(&ACCESS_FBINFO(altout.lock)); | 1228 | up_write(&minfo->altout.lock); |
1229 | md->primary_head = NULL; | 1229 | md->primary_head = NULL; |
1230 | } | 1230 | } |
1231 | return 0; | 1231 | return 0; |