V4L/DVB: tm6000: Replace all magic values by a register alias
authorMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 11 Mar 2010 13:26:46 +0000 (10:26 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 18 May 2010 03:47:09 +0000 (00:47 -0300)
commit9afec493e2fe1a477305a09f933267d805fe4c8c
tree5d302db5d1fe8d8cc7ad5428b58cf5a5b04478bc
parent77012fb9954ebe355ce4ecfdaf9a0d5b88cb665b
V4L/DVB: tm6000: Replace all magic values by a register alias

Instead of using magic pairs of req/reg, replace them by the defined
values.

This patch were generated by the following script:

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_AVREG[_BIT]*, 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>
drivers/staging/tm6000/tm6000-alsa.c
drivers/staging/tm6000/tm6000-core.c
drivers/staging/tm6000/tm6000-stds.c
drivers/staging/tm6000/tm6000-video.c