summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/s5h1420.c
diff options
context:
space:
mode:
authorJean Delvare2008-09-03 22:12:23 +0200
committerMauro Carvalho Chehab2008-09-03 23:37:50 +0200
commit1d434012f23effdc69d58a88229159b57256f6ba (patch)
tree8d713db39a3fcf60cf1a9316aba31cdf3e23e1d8 /drivers/media/dvb/frontends/s5h1420.c
parentV4L/DVB (8835): gspca: Same pixfmt as the sn9c102 driver and raw Bayer added ... (diff)
downloadkernel-qcow2-linux-1d434012f23effdc69d58a88229159b57256f6ba.tar.gz
kernel-qcow2-linux-1d434012f23effdc69d58a88229159b57256f6ba.tar.xz
kernel-qcow2-linux-1d434012f23effdc69d58a88229159b57256f6ba.zip
V4L/DVB (8837): dvb: fix I2C adapters name size
Some DVB drivers are incorrectly assuming that the size of i2c_adapter.name is I2C_NAME_SIZE. Here's a fix. Also change strncpy to strlcpy, as the former is error-prone (and was indeed incorrectly used.) Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Uwe Bugla <uwe.bugla@gmx.de> Reviewed-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/s5h1420.c')
-rw-r--r--drivers/media/dvb/frontends/s5h1420.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/s5h1420.c b/drivers/media/dvb/frontends/s5h1420.c
index 720ed9ff7c5f..747d3fa2e5e5 100644
--- a/drivers/media/dvb/frontends/s5h1420.c
+++ b/drivers/media/dvb/frontends/s5h1420.c
@@ -915,7 +915,8 @@ struct dvb_frontend *s5h1420_attach(const struct s5h1420_config *config,
state->frontend.demodulator_priv = state;
/* create tuner i2c adapter */
- strncpy(state->tuner_i2c_adapter.name, "S5H1420-PN1010 tuner I2C bus", I2C_NAME_SIZE);
+ strlcpy(state->tuner_i2c_adapter.name, "S5H1420-PN1010 tuner I2C bus",
+ sizeof(state->tuner_i2c_adapter.name));
state->tuner_i2c_adapter.class = I2C_CLASS_TV_DIGITAL,
state->tuner_i2c_adapter.algo = &s5h1420_tuner_i2c_algo;
state->tuner_i2c_adapter.algo_data = NULL;