All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: linux-media@vger.kernel.org
Subject: [PATCH 7/7] V4L/DVB: tm6000: replace occurences of req05 magic by a naming alias
Date: Thu, 11 Mar 2010 10:26:45 -0300	[thread overview]
Message-ID: <20100311102645.1f8eae28@pedra> (raw)
In-Reply-To: <cover.1268311636.git.mchehab@redhat.com>

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>

diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c
index d501df2..1b588f8 100644
--- a/drivers/staging/tm6000/tm6000-core.c
+++ b/drivers/staging/tm6000/tm6000-core.c
@@ -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[] = {
@@ -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 },
-- 
1.6.6.1


  parent reply	other threads:[~2010-03-11 13:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1268311636.git.mchehab@redhat.com>
2010-03-11 13:26 ` [PATCH 6/7] V4L/DVB: tm6000: add request to registers of the group 05 Mauro Carvalho Chehab
2010-03-11 13:26 ` [PATCH 5/7] V4L/DVB: tm6000: Replace naming convention for registers of req 05 group Mauro Carvalho Chehab
2010-03-11 13:26 ` Mauro Carvalho Chehab [this message]
2010-03-11 13:26 ` [PATCH 1/7] V4L/DVB: tm6000: Replace all Req 7 group of regs with another naming convention Mauro Carvalho Chehab
2010-03-11 13:26 ` [PATCH 3/7] V4L/DVB: tm6000: Add request at Req07/Req08 register definitions Mauro Carvalho Chehab
2010-03-11 13:26 ` [PATCH 4/7] V4L/DVB: tm6000: Replace all magic values by a register alias Mauro Carvalho Chehab
2010-03-11 13:26 ` [PATCH 2/7] V4L/DVB: tm6000: Replace all Req 8 group of regs with another naming convention Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100311102645.1f8eae28@pedra \
    --to=mchehab@redhat.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.