aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/matrox/matroxfb_crtc2.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-09-22 19:47:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:57 -0400
commit316b4d644caceb2cf7432d8a27e45b88f57ef2a0 (patch)
tree3c1815b8a4a8e4e5999e657a26e5cea222d02dcd /drivers/video/matrox/matroxfb_crtc2.c
parentfc2d10ddfc8989e82f74d2a38c7d6bfa45bcaba9 (diff)
matroxfb: get rid of unneeded macros WPMINFO and friends
With multihead support always enabled, these macros are no longer needed and make the code harder to read. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Petr Vandrovec <vandrove@vc.cvut.cz> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/matrox/matroxfb_crtc2.c')
-rw-r--r--drivers/video/matrox/matroxfb_crtc2.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c
index 8249959cde2e..f41d4b4f8e75 100644
--- a/drivers/video/matrox/matroxfb_crtc2.c
+++ b/drivers/video/matrox/matroxfb_crtc2.c
@@ -369,8 +369,8 @@ static int matroxfb_dh_set_par(struct fb_info* info) {
369 } else { 369 } else {
370 matroxfb_dh_disable(m2info); 370 matroxfb_dh_disable(m2info);
371 } 371 }
372 DAC1064_global_init(PMINFO2); 372 DAC1064_global_init(minfo);
373 DAC1064_global_restore(PMINFO2); 373 DAC1064_global_restore(minfo);
374 down_read(&minfo->altout.lock); 374 down_read(&minfo->altout.lock);
375 for (out = 0; out < MATROXFB_MAX_OUTPUTS; out++) { 375 for (out = 0; out < MATROXFB_MAX_OUTPUTS; out++) {
376 if (minfo->outputs[out].src == MATROXFB_SRC_CRTC2 && 376 if (minfo->outputs[out].src == MATROXFB_SRC_CRTC2 &&
@@ -401,7 +401,7 @@ static int matroxfb_dh_pan_display(struct fb_var_screeninfo* var, struct fb_info
401static int matroxfb_dh_get_vblank(const struct matroxfb_dh_fb_info* m2info, struct fb_vblank* vblank) { 401static int matroxfb_dh_get_vblank(const struct matroxfb_dh_fb_info* m2info, struct fb_vblank* vblank) {
402 MINFO_FROM(m2info->primary_dev); 402 MINFO_FROM(m2info->primary_dev);
403 403
404 matroxfb_enable_irq(PMINFO 0); 404 matroxfb_enable_irq(minfo, 0);
405 memset(vblank, 0, sizeof(*vblank)); 405 memset(vblank, 0, sizeof(*vblank));
406 vblank->flags = FB_VBLANK_HAVE_VCOUNT | FB_VBLANK_HAVE_VBLANK; 406 vblank->flags = FB_VBLANK_HAVE_VCOUNT | FB_VBLANK_HAVE_VBLANK;
407 /* mask out reserved bits + field number (odd/even) */ 407 /* mask out reserved bits + field number (odd/even) */
@@ -449,7 +449,7 @@ static int matroxfb_dh_ioctl(struct fb_info *info,
449 449
450 if (crt != 0) 450 if (crt != 0)
451 return -ENODEV; 451 return -ENODEV;
452 return matroxfb_wait_for_sync(PMINFO 1); 452 return matroxfb_wait_for_sync(minfo, 1);
453 } 453 }
454 case MATROXFB_SET_OUTPUT_MODE: 454 case MATROXFB_SET_OUTPUT_MODE:
455 case MATROXFB_GET_OUTPUT_MODE: 455 case MATROXFB_GET_OUTPUT_MODE:
@@ -595,7 +595,9 @@ static struct fb_var_screeninfo matroxfb_dh_defined = {
595 0, {0,0,0,0,0} 595 0, {0,0,0,0,0}
596}; 596};
597 597
598static int matroxfb_dh_regit(CPMINFO struct matroxfb_dh_fb_info* m2info) { 598static int matroxfb_dh_regit(const struct matrox_fb_info *minfo,
599 struct matroxfb_dh_fb_info *m2info)
600{
599#define minfo (m2info->primary_dev) 601#define minfo (m2info->primary_dev)
600 void* oldcrtc2; 602 void* oldcrtc2;
601 603
@@ -649,7 +651,7 @@ static int matroxfb_dh_regit(CPMINFO struct matroxfb_dh_fb_info* m2info) {
649 651
650static int matroxfb_dh_registerfb(struct matroxfb_dh_fb_info* m2info) { 652static int matroxfb_dh_registerfb(struct matroxfb_dh_fb_info* m2info) {
651#define minfo (m2info->primary_dev) 653#define minfo (m2info->primary_dev)
652 if (matroxfb_dh_regit(PMINFO m2info)) { 654 if (matroxfb_dh_regit(minfo, m2info)) {
653 printk(KERN_ERR "matroxfb_crtc2: secondary head failed to register\n"); 655 printk(KERN_ERR "matroxfb_crtc2: secondary head failed to register\n");
654 return -1; 656 return -1;
655 } 657 }