[PATCH] drivers/video/sis: use the constant InterlaceMode

From: Julia Lawall
Date: Mon Apr 06 2009 - 11:43:50 EST


From: Julia Lawall <julia@xxxxxxx>

Use the constant InterlaceMode rather than the magic number 0x0080.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r@
type T;
T E;
identifier fld;
identifier c;
@@

E->fld & c

@s@
constant C;
identifier r.c;
@@

#define c C

@@
r.T E;
identifier r.fld;
identifier r.c;
constant s.C;
@@

E->fld &
- C
+ c
// </smpl>

Signed-off-by: Julia Lawall <julia@xxxxxxx>

---
drivers/video/sis/initextlfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/video/sis/initextlfb.c b/drivers/video/sis/initextlfb.c
--- a/drivers/video/sis/initextlfb.c 2008-12-07 19:29:06.000000000 +0100
+++ b/drivers/video/sis/initextlfb.c 2009-04-06 16:55:38.000000000 +0200
@@ -143,7 +143,7 @@ sisfb_mode_rate_to_ddata(struct SiS_Priv
var->sync |= FB_SYNC_HOR_HIGH_ACT;

var->vmode = FB_VMODE_NONINTERLACED;
- if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & 0x0080)
+ if (SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & InterlaceMode)
var->vmode = FB_VMODE_INTERLACED;
else {
j = 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/