aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/matrox/matroxfb_base.h
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-09-22 19:47:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:57 -0400
commitfc2d10ddfc8989e82f74d2a38c7d6bfa45bcaba9 (patch)
treebda524a0244bb7df1e0f315b1344989564f63765 /drivers/video/matrox/matroxfb_base.h
parent0728bacbba3b0267fa8ca8be69aa43d81b57ab51 (diff)
matroxfb: get rid of unneeded macros ACCESS_FBINFO and MINFO
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_base.h')
-rw-r--r--drivers/video/matrox/matroxfb_base.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h
index ba64f5e33467..bbd7c04b0b1f 100644
--- a/drivers/video/matrox/matroxfb_base.h
+++ b/drivers/video/matrox/matroxfb_base.h
@@ -524,11 +524,6 @@ struct matrox_fb_info {
524 524
525#define info2minfo(info) container_of(info, struct matrox_fb_info, fbcon) 525#define info2minfo(info) container_of(info, struct matrox_fb_info, fbcon)
526 526
527#define ACCESS_FBINFO2(info, x) (info->x)
528#define ACCESS_FBINFO(x) ACCESS_FBINFO2(minfo,x)
529
530#define MINFO minfo
531
532#define WPMINFO2 struct matrox_fb_info* minfo 527#define WPMINFO2 struct matrox_fb_info* minfo
533#define WPMINFO WPMINFO2 , 528#define WPMINFO WPMINFO2 ,
534#define CPMINFO2 const struct matrox_fb_info* minfo 529#define CPMINFO2 const struct matrox_fb_info* minfo
@@ -707,11 +702,11 @@ void matroxfb_unregister_driver(struct matroxfb_driver* drv);
707#endif 702#endif
708#endif 703#endif
709 704
710#define mga_inb(addr) mga_readb(ACCESS_FBINFO(mmio.vbase), (addr)) 705#define mga_inb(addr) mga_readb(minfo->mmio.vbase, (addr))
711#define mga_inl(addr) mga_readl(ACCESS_FBINFO(mmio.vbase), (addr)) 706#define mga_inl(addr) mga_readl(minfo->mmio.vbase, (addr))
712#define mga_outb(addr,val) mga_writeb(ACCESS_FBINFO(mmio.vbase), (addr), (val)) 707#define mga_outb(addr,val) mga_writeb(minfo->mmio.vbase, (addr), (val))
713#define mga_outw(addr,val) mga_writew(ACCESS_FBINFO(mmio.vbase), (addr), (val)) 708#define mga_outw(addr,val) mga_writew(minfo->mmio.vbase, (addr), (val))
714#define mga_outl(addr,val) mga_writel(ACCESS_FBINFO(mmio.vbase), (addr), (val)) 709#define mga_outl(addr,val) mga_writel(minfo->mmio.vbase, (addr), (val))
715#define mga_readr(port,idx) (mga_outb((port),(idx)), mga_inb((port)+1)) 710#define mga_readr(port,idx) (mga_outb((port),(idx)), mga_inb((port)+1))
716#define mga_setr(addr,port,val) mga_outw(addr, ((val)<<8) | (port)) 711#define mga_setr(addr,port,val) mga_outw(addr, ((val)<<8) | (port))
717 712
@@ -730,10 +725,10 @@ void matroxfb_unregister_driver(struct matroxfb_driver* drv);
730#define isMilleniumII(x) (0) 725#define isMilleniumII(x) (0)
731#endif 726#endif
732 727
733#define matroxfb_DAC_lock() spin_lock(&ACCESS_FBINFO(lock.DAC)) 728#define matroxfb_DAC_lock() spin_lock(&minfo->lock.DAC)
734#define matroxfb_DAC_unlock() spin_unlock(&ACCESS_FBINFO(lock.DAC)) 729#define matroxfb_DAC_unlock() spin_unlock(&minfo->lock.DAC)
735#define matroxfb_DAC_lock_irqsave(flags) spin_lock_irqsave(&ACCESS_FBINFO(lock.DAC),flags) 730#define matroxfb_DAC_lock_irqsave(flags) spin_lock_irqsave(&minfo->lock.DAC, flags)
736#define matroxfb_DAC_unlock_irqrestore(flags) spin_unlock_irqrestore(&ACCESS_FBINFO(lock.DAC),flags) 731#define matroxfb_DAC_unlock_irqrestore(flags) spin_unlock_irqrestore(&minfo->lock.DAC, flags)
737extern void matroxfb_DAC_out(CPMINFO int reg, int val); 732extern void matroxfb_DAC_out(CPMINFO int reg, int val);
738extern int matroxfb_DAC_in(CPMINFO int reg); 733extern int matroxfb_DAC_in(CPMINFO int reg);
739extern void matroxfb_var2my(struct fb_var_screeninfo* fvsi, struct my_timming* mt); 734extern void matroxfb_var2my(struct fb_var_screeninfo* fvsi, struct my_timming* mt);
@@ -741,8 +736,8 @@ extern int matroxfb_wait_for_sync(WPMINFO u_int32_t crtc);
741extern int matroxfb_enable_irq(WPMINFO int reenable); 736extern int matroxfb_enable_irq(WPMINFO int reenable);
742 737
743#ifdef MATROXFB_USE_SPINLOCKS 738#ifdef MATROXFB_USE_SPINLOCKS
744#define CRITBEGIN spin_lock_irqsave(&ACCESS_FBINFO(lock.accel), critflags); 739#define CRITBEGIN spin_lock_irqsave(&minfo->lock.accel, critflags);
745#define CRITEND spin_unlock_irqrestore(&ACCESS_FBINFO(lock.accel), critflags); 740#define CRITEND spin_unlock_irqrestore(&minfo->lock.accel, critflags);
746#define CRITFLAGS unsigned long critflags; 741#define CRITFLAGS unsigned long critflags;
747#else 742#else
748#define CRITBEGIN 743#define CRITBEGIN