aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorlawrence rust <lawrence@softsystem.co.uk>2010-08-25 08:50:20 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:04:52 -0400
commit2e4e98e788d8fbe30892bee3375067a4937155da (patch)
tree66d0ae3a74fa77f3e1cffa752dc61bd4089ce609 /drivers/media/common
parentf71d76812e6cd3af8e293eeb8eb465c208e771cc (diff)
V4L/DVB: drivers/media: Make static data tables and strings const
Making static data const avoids allocation of additional r/w memory and reduces initialisation time. It also provides some additional opportunities for compiler optimisations. Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/tuners/xc5000.c2
-rw-r--r--drivers/media/common/tuners/xc5000.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c
index d2b2c12a5561..76ac5cd84af7 100644
--- a/drivers/media/common/tuners/xc5000.c
+++ b/drivers/media/common/tuners/xc5000.c
@@ -1042,7 +1042,7 @@ static const struct dvb_tuner_ops xc5000_tuner_ops = {
1042 1042
1043struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, 1043struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
1044 struct i2c_adapter *i2c, 1044 struct i2c_adapter *i2c,
1045 struct xc5000_config *cfg) 1045 const struct xc5000_config *cfg)
1046{ 1046{
1047 struct xc5000_priv *priv = NULL; 1047 struct xc5000_priv *priv = NULL;
1048 int instance; 1048 int instance;
diff --git a/drivers/media/common/tuners/xc5000.h b/drivers/media/common/tuners/xc5000.h
index e6d7236c9ea1..3756e73649be 100644
--- a/drivers/media/common/tuners/xc5000.h
+++ b/drivers/media/common/tuners/xc5000.h
@@ -53,11 +53,11 @@ struct xc5000_config {
53 (defined(CONFIG_MEDIA_TUNER_XC5000_MODULE) && defined(MODULE)) 53 (defined(CONFIG_MEDIA_TUNER_XC5000_MODULE) && defined(MODULE))
54extern struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, 54extern struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
55 struct i2c_adapter *i2c, 55 struct i2c_adapter *i2c,
56 struct xc5000_config *cfg); 56 const struct xc5000_config *cfg);
57#else 57#else
58static inline struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, 58static inline struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
59 struct i2c_adapter *i2c, 59 struct i2c_adapter *i2c,
60 struct xc5000_config *cfg) 60 const struct xc5000_config *cfg)
61{ 61{
62 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 62 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
63 return NULL; 63 return NULL;