Skip to content

Commit

Permalink
V4L/DVB: tm6000: replace occurences of req05 magic by a naming alias
Browse files Browse the repository at this point in the history
Yet another naming replace magic thanks to perl scripts. This time, it
is done with:

cat tm6000-regs.h |perl -ne 'if (m/(TM6010_REQ[^\s]+)\s+0x([a-f0-9]+)\,
0x([a-f0-9]+)/) { $name="$1"; $req=$2; $val=$3; printf
"s/REQ_${req}_SET_GET_USBREG, 0x[0]*$3,/$1,/\n" }'  >a; for i in tm*.c;
do sed -f a $i >b && mv b $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed May 18, 2010
1 parent d9a7240 commit 2415a2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/tm6000/tm6000-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ struct reg_init tm6000_init_tab[] = {
{ TM6010_REQ07_RC1_TRESHOLD, 0xd0 },
{ TM6010_REQ07_RC3_HSTART1, 0x88 },
{ TM6010_REQ07_R3F_RESET, 0x00 }, /* End of the soft reset */
{ REQ_05_SET_GET_USBREG, 0x18, 0x00 },
{ TM6010_REQ05_R18_IMASK7, 0x00 },
};

struct reg_init tm6010_init_tab[] = {
Expand Down Expand Up @@ -414,7 +414,7 @@ struct reg_init tm6010_init_tab[] = {
{ TM6010_REQ07_RC3_HSTART1, 0x88 },
{ TM6010_REQ07_R3F_RESET, 0x00 },

{ REQ_05_SET_GET_USBREG, 0x18, 0x00 },
{ TM6010_REQ05_R18_IMASK7, 0x00 },

{ TM6010_REQ07_RD8_IR_LEADER1, 0xaa },
{ TM6010_REQ07_RD8_IR_LEADER0, 0x30 },
Expand Down

0 comments on commit 2415a2c

Please sign in to comment.