From: Jean Delvare <khali@linux-fr.org>
To: LMML <linux-media@vger.kernel.org>
Cc: Steven Toth <stoth@kernellabs.com>
Subject: [PATCH 4/5] cx22702: Some things never change
Date: Fri, 10 Sep 2010 15:35:12 +0200 [thread overview]
Message-ID: <20100910153512.5850b9ed@hyperion.delvare> (raw)
In-Reply-To: <20100910151943.103f7423@hyperion.delvare>
The init sequence never changes so it can be marked const. Likewise,
cx22702_ops is a template and can thus be made read-only.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Steven Toth <stoth@kernellabs.com>
---
drivers/media/dvb/frontends/cx22702.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.32-rc5.orig/drivers/media/dvb/frontends/cx22702.c 2009-10-17 14:49:50.000000000 +0200
+++ linux-2.6.32-rc5/drivers/media/dvb/frontends/cx22702.c 2009-10-18 11:44:09.000000000 +0200
@@ -54,7 +54,7 @@ MODULE_PARM_DESC(debug, "Enable verbose
#define dprintk if (debug) printk
/* Register values to initialise the demod */
-static u8 init_tab[] = {
+static const u8 init_tab[] = {
0x00, 0x00, /* Stop aquisition */
0x0B, 0x06,
0x09, 0x01,
@@ -576,7 +576,7 @@ static void cx22702_release(struct dvb_f
kfree(state);
}
-static struct dvb_frontend_ops cx22702_ops;
+static const struct dvb_frontend_ops cx22702_ops;
struct dvb_frontend *cx22702_attach(const struct cx22702_config *config,
struct i2c_adapter *i2c)
@@ -608,7 +608,7 @@ error:
}
EXPORT_SYMBOL(cx22702_attach);
-static struct dvb_frontend_ops cx22702_ops = {
+static const struct dvb_frontend_ops cx22702_ops = {
.info = {
.name = "Conexant CX22702 DVB-T",
--
Jean Delvare
next prev parent reply other threads:[~2010-09-10 13:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-10 13:19 [PATCH 0/5] Clean-ups to the cx22702 frontend driver Jean Delvare
2010-09-10 13:27 ` [PATCH 1/5] cx22702: Clean up register access functions Jean Delvare
2010-09-10 15:13 ` Mauro Carvalho Chehab
2010-09-10 17:03 ` [PATCH 1/5 v2] " Jean Delvare
2010-09-10 13:32 ` [PATCH 2/5] cx22702: Drop useless initializations to 0 Jean Delvare
2010-09-10 13:33 ` [PATCH 3/5] cx22702: Avoid duplicating code in branches Jean Delvare
2010-09-10 13:35 ` Jean Delvare [this message]
2010-09-10 13:36 ` [PATCH 5/5] cx22702: Simplify cx22702_set_tps() Jean Delvare
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=20100910153512.5850b9ed@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=linux-media@vger.kernel.org \
--cc=stoth@kernellabs.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox