diff options
Diffstat (limited to 'drivers/media/usb/tm6000')
-rw-r--r-- | drivers/media/usb/tm6000/tm6000-alsa.c | 6 | ||||
-rw-r--r-- | drivers/media/usb/tm6000/tm6000-i2c.c | 4 | ||||
-rw-r--r-- | drivers/media/usb/tm6000/tm6000-video.c | 13 |
3 files changed, 12 insertions, 11 deletions
diff --git a/drivers/media/usb/tm6000/tm6000-alsa.c b/drivers/media/usb/tm6000/tm6000-alsa.c index f18cffae4c85..b965931793b5 100644 --- a/drivers/media/usb/tm6000/tm6000-alsa.c +++ b/drivers/media/usb/tm6000/tm6000-alsa.c @@ -429,8 +429,8 @@ static int tm6000_audio_init(struct tm6000_core *dev) snd_printk(KERN_ERR "cannot create card instance %d\n", devnr); return rc; } - strcpy(card->driver, "tm6000-alsa"); - strcpy(card->shortname, "TM5600/60x0"); + strscpy(card->driver, "tm6000-alsa", sizeof(card->driver)); + strscpy(card->shortname, "TM5600/60x0", sizeof(card->shortname)); sprintf(card->longname, "TM5600/60x0 Audio at bus %d device %d", dev->udev->bus->busnum, dev->udev->devnum); @@ -456,7 +456,7 @@ static int tm6000_audio_init(struct tm6000_core *dev) pcm->info_flags = 0; pcm->private_data = chip; - strcpy(pcm->name, "Trident TM5600/60x0"); + strscpy(pcm->name, "Trident TM5600/60x0", sizeof(pcm->name)); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_tm6000_pcm_ops); diff --git a/drivers/media/usb/tm6000/tm6000-i2c.c b/drivers/media/usb/tm6000/tm6000-i2c.c index ccd1adf862b1..8c0476dfe54f 100644 --- a/drivers/media/usb/tm6000/tm6000-i2c.c +++ b/drivers/media/usb/tm6000/tm6000-i2c.c @@ -292,7 +292,7 @@ int tm6000_i2c_register(struct tm6000_core *dev) dev->i2c_adap.owner = THIS_MODULE; dev->i2c_adap.algo = &tm6000_algo; dev->i2c_adap.dev.parent = &dev->udev->dev; - strlcpy(dev->i2c_adap.name, dev->name, sizeof(dev->i2c_adap.name)); + strscpy(dev->i2c_adap.name, dev->name, sizeof(dev->i2c_adap.name)); dev->i2c_adap.algo_data = dev; i2c_set_adapdata(&dev->i2c_adap, &dev->v4l2_dev); rc = i2c_add_adapter(&dev->i2c_adap); @@ -300,7 +300,7 @@ int tm6000_i2c_register(struct tm6000_core *dev) return rc; dev->i2c_client.adapter = &dev->i2c_adap; - strlcpy(dev->i2c_client.name, "tm6000 internal", I2C_NAME_SIZE); + strscpy(dev->i2c_client.name, "tm6000 internal", I2C_NAME_SIZE); tm6000_i2c_eeprom(dev); return 0; diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index 7d268f2404e1..6c992f197255 100644 --- a/drivers/media/usb/tm6000/tm6000-video.c +++ b/drivers/media/usb/tm6000/tm6000-video.c @@ -856,8 +856,9 @@ static int vidioc_querycap(struct file *file, void *priv, struct tm6000_core *dev = ((struct tm6000_fh *)priv)->dev; struct video_device *vdev = video_devdata(file); - strlcpy(cap->driver, "tm6000", sizeof(cap->driver)); - strlcpy(cap->card, "Trident TVMaster TM5600/6000/6010", sizeof(cap->card)); + strscpy(cap->driver, "tm6000", sizeof(cap->driver)); + strscpy(cap->card, "Trident TVMaster TM5600/6000/6010", + sizeof(cap->card)); usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info)); if (dev->tuner_type != TUNER_ABSENT) cap->device_caps |= V4L2_CAP_TUNER; @@ -879,7 +880,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, if (f->index >= ARRAY_SIZE(format)) return -EINVAL; - strlcpy(f->description, format[f->index].name, sizeof(f->description)); + strscpy(f->description, format[f->index].name, sizeof(f->description)); f->pixelformat = format[f->index].fourcc; return 0; } @@ -1091,7 +1092,7 @@ static int vidioc_enum_input(struct file *file, void *priv, else i->type = V4L2_INPUT_TYPE_CAMERA; - strcpy(i->name, iname[dev->vinput[n].type]); + strscpy(i->name, iname[dev->vinput[n].type], sizeof(i->name)); i->std = TM6000_STD; @@ -1188,7 +1189,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, if (0 != t->index) return -EINVAL; - strcpy(t->name, "Television"); + strscpy(t->name, "Television", sizeof(t->name)); t->type = V4L2_TUNER_ANALOG_TV; t->capability = V4L2_TUNER_CAP_NORM | V4L2_TUNER_CAP_STEREO; t->rangehigh = 0xffffffffUL; @@ -1268,7 +1269,7 @@ static int radio_g_tuner(struct file *file, void *priv, return -EINVAL; memset(t, 0, sizeof(*t)); - strcpy(t->name, "Radio"); + strscpy(t->name, "Radio", sizeof(t->name)); t->type = V4L2_TUNER_RADIO; t->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO; t->rxsubchans = V4L2_TUNER_SUB_STEREO; |