media: use strscpy() instead of strlcpy()
The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
b730c40813
commit
c0decac19d
|
@ -77,9 +77,9 @@ static long cec_adap_g_caps(struct cec_adapter *adap,
|
|||
{
|
||||
struct cec_caps caps = {};
|
||||
|
||||
strlcpy(caps.driver, adap->devnode.dev.parent->driver->name,
|
||||
strscpy(caps.driver, adap->devnode.dev.parent->driver->name,
|
||||
sizeof(caps.driver));
|
||||
strlcpy(caps.name, adap->name, sizeof(caps.name));
|
||||
strscpy(caps.name, adap->name, sizeof(caps.name));
|
||||
caps.available_log_addrs = adap->available_log_addrs;
|
||||
caps.capabilities = adap->capabilities;
|
||||
caps.version = LINUX_VERSION_CODE;
|
||||
|
|
|
@ -264,7 +264,7 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
|
|||
adap = kzalloc(sizeof(*adap), GFP_KERNEL);
|
||||
if (!adap)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
strlcpy(adap->name, name, sizeof(adap->name));
|
||||
strscpy(adap->name, name, sizeof(adap->name));
|
||||
adap->phys_addr = CEC_PHYS_ADDR_INVALID;
|
||||
adap->cec_pin_is_high = true;
|
||||
adap->log_addrs.cec_version = CEC_OP_CEC_VERSION_2_0;
|
||||
|
|
|
@ -226,12 +226,12 @@ int flexcop_i2c_init(struct flexcop_device *fc)
|
|||
fc->fc_i2c_adap[1].port = FC_I2C_PORT_EEPROM;
|
||||
fc->fc_i2c_adap[2].port = FC_I2C_PORT_TUNER;
|
||||
|
||||
strlcpy(fc->fc_i2c_adap[0].i2c_adap.name, "B2C2 FlexCop I2C to demod",
|
||||
sizeof(fc->fc_i2c_adap[0].i2c_adap.name));
|
||||
strlcpy(fc->fc_i2c_adap[1].i2c_adap.name, "B2C2 FlexCop I2C to eeprom",
|
||||
sizeof(fc->fc_i2c_adap[1].i2c_adap.name));
|
||||
strlcpy(fc->fc_i2c_adap[2].i2c_adap.name, "B2C2 FlexCop I2C to tuner",
|
||||
sizeof(fc->fc_i2c_adap[2].i2c_adap.name));
|
||||
strscpy(fc->fc_i2c_adap[0].i2c_adap.name, "B2C2 FlexCop I2C to demod",
|
||||
sizeof(fc->fc_i2c_adap[0].i2c_adap.name));
|
||||
strscpy(fc->fc_i2c_adap[1].i2c_adap.name, "B2C2 FlexCop I2C to eeprom",
|
||||
sizeof(fc->fc_i2c_adap[1].i2c_adap.name));
|
||||
strscpy(fc->fc_i2c_adap[2].i2c_adap.name, "B2C2 FlexCop I2C to tuner",
|
||||
sizeof(fc->fc_i2c_adap[2].i2c_adap.name));
|
||||
|
||||
i2c_set_adapdata(&fc->fc_i2c_adap[0].i2c_adap, &fc->fc_i2c_adap[0]);
|
||||
i2c_set_adapdata(&fc->fc_i2c_adap[1].i2c_adap, &fc->fc_i2c_adap[1]);
|
||||
|
|
|
@ -569,7 +569,7 @@ static int cx2341x_ctrl_query_fill(struct v4l2_queryctrl *qctrl,
|
|||
qctrl->step = step;
|
||||
qctrl->default_value = def;
|
||||
qctrl->reserved[0] = qctrl->reserved[1] = 0;
|
||||
strlcpy(qctrl->name, name, sizeof(qctrl->name));
|
||||
strscpy(qctrl->name, name, sizeof(qctrl->name));
|
||||
return 0;
|
||||
|
||||
default:
|
||||
|
|
|
@ -606,7 +606,7 @@ int saa7146_register_device(struct video_device *vfd, struct saa7146_dev *dev,
|
|||
vfd->tvnorms = 0;
|
||||
for (i = 0; i < dev->ext_vv_data->num_stds; i++)
|
||||
vfd->tvnorms |= dev->ext_vv_data->stds[i].id;
|
||||
strlcpy(vfd->name, name, sizeof(vfd->name));
|
||||
strscpy(vfd->name, name, sizeof(vfd->name));
|
||||
video_set_drvdata(vfd, dev);
|
||||
|
||||
err = video_register_device(vfd, type, -1);
|
||||
|
|
|
@ -452,7 +452,7 @@ static int vidioc_querycap(struct file *file, void *fh, struct v4l2_capability *
|
|||
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
|
||||
|
||||
strcpy((char *)cap->driver, "saa7146 v4l2");
|
||||
strlcpy((char *)cap->card, dev->ext->name, sizeof(cap->card));
|
||||
strscpy((char *)cap->card, dev->ext->name, sizeof(cap->card));
|
||||
sprintf((char *)cap->bus_info, "PCI:%s", pci_name(dev->pci));
|
||||
cap->device_caps =
|
||||
V4L2_CAP_VIDEO_CAPTURE |
|
||||
|
@ -525,8 +525,8 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtd
|
|||
{
|
||||
if (f->index >= ARRAY_SIZE(formats))
|
||||
return -EINVAL;
|
||||
strlcpy((char *)f->description, formats[f->index].name,
|
||||
sizeof(f->description));
|
||||
strscpy((char *)f->description, formats[f->index].name,
|
||||
sizeof(f->description));
|
||||
f->pixelformat = formats[f->index].pixelformat;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -450,7 +450,7 @@ static struct smscore_registry_entry_t *smscore_find_registry(char *devpath)
|
|||
entry = kmalloc(sizeof(*entry), GFP_KERNEL);
|
||||
if (entry) {
|
||||
entry->mode = default_mode;
|
||||
strlcpy(entry->devpath, devpath, sizeof(entry->devpath));
|
||||
strscpy(entry->devpath, devpath, sizeof(entry->devpath));
|
||||
list_add(&entry->entry, &g_smscore_registry);
|
||||
} else
|
||||
pr_err("failed to create smscore_registry.\n");
|
||||
|
@ -735,7 +735,7 @@ int smscore_register_device(struct smsdevice_params_t *params,
|
|||
dev->postload_handler = params->postload_handler;
|
||||
|
||||
dev->device_flags = params->flags;
|
||||
strlcpy(dev->devpath, params->devpath, sizeof(dev->devpath));
|
||||
strscpy(dev->devpath, params->devpath, sizeof(dev->devpath));
|
||||
|
||||
smscore_registry_settype(dev->devpath, params->device_type);
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ int sms_ir_init(struct smscore_device_t *coredev)
|
|||
snprintf(coredev->ir.name, sizeof(coredev->ir.name),
|
||||
"SMS IR (%s)", sms_get_board(board_id)->name);
|
||||
|
||||
strlcpy(coredev->ir.phys, coredev->devpath, sizeof(coredev->ir.phys));
|
||||
strscpy(coredev->ir.phys, coredev->devpath, sizeof(coredev->ir.phys));
|
||||
strlcat(coredev->ir.phys, "/ir0", sizeof(coredev->ir.phys));
|
||||
|
||||
dev->device_name = coredev->ir.name;
|
||||
|
|
|
@ -194,7 +194,7 @@ int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int nonblocking)
|
|||
spin_lock_init(&ctx->slock);
|
||||
INIT_LIST_HEAD(&ctx->dvb_q);
|
||||
|
||||
strlcpy(ctx->name, name, DVB_VB2_NAME_MAX);
|
||||
strscpy(ctx->name, name, DVB_VB2_NAME_MAX);
|
||||
ctx->nonblocking = nonblocking;
|
||||
ctx->state = DVB_VB2_STATE_INIT;
|
||||
|
||||
|
|
|
@ -967,9 +967,9 @@ struct i2c_client *dvb_module_probe(const char *module_name,
|
|||
return NULL;
|
||||
|
||||
if (name)
|
||||
strlcpy(board_info->type, name, I2C_NAME_SIZE);
|
||||
strscpy(board_info->type, name, I2C_NAME_SIZE);
|
||||
else
|
||||
strlcpy(board_info->type, module_name, I2C_NAME_SIZE);
|
||||
strscpy(board_info->type, module_name, I2C_NAME_SIZE);
|
||||
|
||||
board_info->addr = addr;
|
||||
board_info->platform_data = platform_data;
|
||||
|
|
|
@ -1087,7 +1087,7 @@ struct dvb_frontend *cx24123_attach(const struct cx24123_config *config,
|
|||
if (config->dont_use_pll)
|
||||
cx24123_repeater_mode(state, 1, 0);
|
||||
|
||||
strlcpy(state->tuner_i2c_adapter.name, "CX24123 tuner I2C bus",
|
||||
strscpy(state->tuner_i2c_adapter.name, "CX24123 tuner I2C bus",
|
||||
sizeof(state->tuner_i2c_adapter.name));
|
||||
state->tuner_i2c_adapter.algo = &cx24123_tuner_i2c_algo;
|
||||
state->tuner_i2c_adapter.algo_data = NULL;
|
||||
|
|
|
@ -540,7 +540,7 @@ struct dvb_frontend *cxd2820r_attach(const struct cxd2820r_config *config,
|
|||
pdata.attach_in_use = true;
|
||||
|
||||
memset(&board_info, 0, sizeof(board_info));
|
||||
strlcpy(board_info.type, "cxd2820r", I2C_NAME_SIZE);
|
||||
strscpy(board_info.type, "cxd2820r", I2C_NAME_SIZE);
|
||||
board_info.addr = config->i2c_address;
|
||||
board_info.platform_data = &pdata;
|
||||
client = i2c_new_device(adapter, &board_info);
|
||||
|
|
|
@ -424,7 +424,7 @@ static int i2c_adapter_init(struct i2c_adapter *i2c_adap,
|
|||
struct i2c_algorithm *algo, const char *name,
|
||||
struct dibx000_i2c_master *mst)
|
||||
{
|
||||
strlcpy(i2c_adap->name, name, sizeof(i2c_adap->name));
|
||||
strscpy(i2c_adap->name, name, sizeof(i2c_adap->name));
|
||||
i2c_adap->algo = algo;
|
||||
i2c_adap->algo_data = NULL;
|
||||
i2c_set_adapdata(i2c_adap, mst);
|
||||
|
|
|
@ -929,7 +929,7 @@ struct dvb_frontend *lgdt330x_attach(const struct lgdt330x_config *_config,
|
|||
struct i2c_board_info board_info = {};
|
||||
struct lgdt330x_config config = *_config;
|
||||
|
||||
strlcpy(board_info.type, "lgdt330x", sizeof(board_info.type));
|
||||
strscpy(board_info.type, "lgdt330x", sizeof(board_info.type));
|
||||
board_info.addr = demod_address;
|
||||
board_info.platform_data = &config;
|
||||
client = i2c_new_device(i2c, &board_info);
|
||||
|
|
|
@ -1284,7 +1284,7 @@ struct dvb_frontend *m88ds3103_attach(const struct m88ds3103_config *cfg,
|
|||
pdata.attach_in_use = true;
|
||||
|
||||
memset(&board_info, 0, sizeof(board_info));
|
||||
strlcpy(board_info.type, "m88ds3103", I2C_NAME_SIZE);
|
||||
strscpy(board_info.type, "m88ds3103", I2C_NAME_SIZE);
|
||||
board_info.addr = cfg->i2c_addr;
|
||||
board_info.platform_data = &pdata;
|
||||
client = i2c_new_device(i2c, &board_info);
|
||||
|
|
|
@ -439,8 +439,8 @@ static int rtl2832_sdr_querycap(struct file *file, void *fh,
|
|||
|
||||
dev_dbg(&pdev->dev, "\n");
|
||||
|
||||
strlcpy(cap->driver, KBUILD_MODNAME, sizeof(cap->driver));
|
||||
strlcpy(cap->card, dev->vdev.name, sizeof(cap->card));
|
||||
strscpy(cap->driver, KBUILD_MODNAME, sizeof(cap->driver));
|
||||
strscpy(cap->card, dev->vdev.name, sizeof(cap->card));
|
||||
usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info));
|
||||
cap->device_caps = V4L2_CAP_SDR_CAPTURE | V4L2_CAP_STREAMING |
|
||||
V4L2_CAP_READWRITE | V4L2_CAP_TUNER;
|
||||
|
@ -976,7 +976,7 @@ static int rtl2832_sdr_g_tuner(struct file *file, void *priv,
|
|||
dev_dbg(&pdev->dev, "index=%d type=%d\n", v->index, v->type);
|
||||
|
||||
if (v->index == 0) {
|
||||
strlcpy(v->name, "ADC: Realtek RTL2832", sizeof(v->name));
|
||||
strscpy(v->name, "ADC: Realtek RTL2832", sizeof(v->name));
|
||||
v->type = V4L2_TUNER_ADC;
|
||||
v->capability = V4L2_TUNER_CAP_1HZ | V4L2_TUNER_CAP_FREQ_BANDS;
|
||||
v->rangelow = 300000;
|
||||
|
@ -986,7 +986,7 @@ static int rtl2832_sdr_g_tuner(struct file *file, void *priv,
|
|||
V4L2_SUBDEV_HAS_OP(dev->v4l2_subdev, tuner, g_tuner)) {
|
||||
ret = v4l2_subdev_call(dev->v4l2_subdev, tuner, g_tuner, v);
|
||||
} else if (v->index == 1) {
|
||||
strlcpy(v->name, "RF: <unknown>", sizeof(v->name));
|
||||
strscpy(v->name, "RF: <unknown>", sizeof(v->name));
|
||||
v->type = V4L2_TUNER_RF;
|
||||
v->capability = V4L2_TUNER_CAP_1HZ | V4L2_TUNER_CAP_FREQ_BANDS;
|
||||
v->rangelow = 50000000;
|
||||
|
@ -1133,7 +1133,7 @@ static int rtl2832_sdr_enum_fmt_sdr_cap(struct file *file, void *priv,
|
|||
if (f->index >= dev->num_formats)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, formats[f->index].name, sizeof(f->description));
|
||||
strscpy(f->description, formats[f->index].name, sizeof(f->description));
|
||||
f->pixelformat = formats[f->index].pixelformat;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -912,7 +912,7 @@ struct dvb_frontend *s5h1420_attach(const struct s5h1420_config *config,
|
|||
state->frontend.demodulator_priv = state;
|
||||
|
||||
/* create tuner i2c adapter */
|
||||
strlcpy(state->tuner_i2c_adapter.name, "S5H1420-PN1010 tuner I2C bus",
|
||||
strscpy(state->tuner_i2c_adapter.name, "S5H1420-PN1010 tuner I2C bus",
|
||||
sizeof(state->tuner_i2c_adapter.name));
|
||||
state->tuner_i2c_adapter.algo = &s5h1420_tuner_i2c_algo;
|
||||
state->tuner_i2c_adapter.algo_data = NULL;
|
||||
|
|
|
@ -781,7 +781,7 @@ static int tc90522_probe(struct i2c_client *client,
|
|||
adap->owner = THIS_MODULE;
|
||||
adap->algo = &tc90522_tuner_i2c_algo;
|
||||
adap->dev.parent = &client->dev;
|
||||
strlcpy(adap->name, "tc90522_sub", sizeof(adap->name));
|
||||
strscpy(adap->name, "tc90522_sub", sizeof(adap->name));
|
||||
i2c_set_adapdata(adap, state);
|
||||
ret = i2c_add_adapter(adap);
|
||||
if (ret < 0)
|
||||
|
|
|
@ -525,7 +525,7 @@ struct dvb_frontend *ts2020_attach(struct dvb_frontend *fe,
|
|||
pdata.attach_in_use = true;
|
||||
|
||||
memset(&board_info, 0, sizeof(board_info));
|
||||
strlcpy(board_info.type, "ts2020", I2C_NAME_SIZE);
|
||||
strscpy(board_info.type, "ts2020", I2C_NAME_SIZE);
|
||||
board_info.addr = config->tuner_address;
|
||||
board_info.platform_data = &pdata;
|
||||
client = i2c_new_device(i2c, &board_info);
|
||||
|
|
|
@ -499,7 +499,8 @@ static int zd1301_demod_probe(struct platform_device *pdev)
|
|||
goto err_kfree;
|
||||
|
||||
/* Create I2C adapter */
|
||||
strlcpy(dev->adapter.name, "ZyDAS ZD1301 demod", sizeof(dev->adapter.name));
|
||||
strscpy(dev->adapter.name, "ZyDAS ZD1301 demod",
|
||||
sizeof(dev->adapter.name));
|
||||
dev->adapter.algo = &zd1301_demod_i2c_algorithm;
|
||||
dev->adapter.algo_data = NULL;
|
||||
dev->adapter.dev.parent = pdev->dev.parent;
|
||||
|
|
|
@ -149,7 +149,7 @@ static int cs53l32a_probe(struct i2c_client *client,
|
|||
return -EIO;
|
||||
|
||||
if (!id)
|
||||
strlcpy(client->name, "cs53l32a", sizeof(client->name));
|
||||
strscpy(client->name, "cs53l32a", sizeof(client->name));
|
||||
|
||||
v4l_info(client, "chip found @ 0x%x (%s)\n",
|
||||
client->addr << 1, client->adapter->name);
|
||||
|
|
|
@ -1895,7 +1895,7 @@ static int imx274_probe(struct i2c_client *client,
|
|||
imx274->client = client;
|
||||
sd = &imx274->sd;
|
||||
v4l2_i2c_subdev_init(sd, client, &imx274_subdev_ops);
|
||||
strlcpy(sd->name, DRIVER_NAME, sizeof(sd->name));
|
||||
strscpy(sd->name, DRIVER_NAME, sizeof(sd->name));
|
||||
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
|
||||
|
||||
/* initialize subdev media pad */
|
||||
|
|
|
@ -987,7 +987,7 @@ static int m5mols_probe(struct i2c_client *client,
|
|||
|
||||
sd = &info->sd;
|
||||
v4l2_i2c_subdev_init(sd, client, &m5mols_ops);
|
||||
strlcpy(sd->name, MODULE_NAME, sizeof(sd->name));
|
||||
strscpy(sd->name, MODULE_NAME, sizeof(sd->name));
|
||||
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
|
||||
sd->internal_ops = &m5mols_subdev_internal_ops;
|
||||
|
|
|
@ -1165,7 +1165,7 @@ static int max2175_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
|||
if (vt->index > 0)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(vt->name, "RF", sizeof(vt->name));
|
||||
strscpy(vt->name, "RF", sizeof(vt->name));
|
||||
vt->type = V4L2_TUNER_RF;
|
||||
vt->capability = V4L2_TUNER_CAP_1HZ | V4L2_TUNER_CAP_FREQ_BANDS;
|
||||
vt->rangelow = ctx->bands_rf->rangelow;
|
||||
|
|
|
@ -688,7 +688,7 @@ static int msp_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
|||
#endif
|
||||
|
||||
if (!id)
|
||||
strlcpy(client->name, "msp3400", sizeof(client->name));
|
||||
strscpy(client->name, "msp3400", sizeof(client->name));
|
||||
|
||||
if (msp_reset(client) == -1) {
|
||||
dev_dbg_lvl(&client->dev, 1, msp_debug, "msp3400 not found\n");
|
||||
|
|
|
@ -720,7 +720,7 @@ static int noon010_probe(struct i2c_client *client,
|
|||
mutex_init(&info->lock);
|
||||
sd = &info->sd;
|
||||
v4l2_i2c_subdev_init(sd, client, &noon010_ops);
|
||||
strlcpy(sd->name, MODULE_NAME, sizeof(sd->name));
|
||||
strscpy(sd->name, MODULE_NAME, sizeof(sd->name));
|
||||
|
||||
sd->internal_ops = &noon010_subdev_internal_ops;
|
||||
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
|
|
|
@ -1539,7 +1539,7 @@ static int ov965x_probe(struct i2c_client *client,
|
|||
|
||||
sd = &ov965x->sd;
|
||||
v4l2_i2c_subdev_init(sd, client, &ov965x_subdev_ops);
|
||||
strlcpy(sd->name, DRIVER_NAME, sizeof(sd->name));
|
||||
strscpy(sd->name, DRIVER_NAME, sizeof(sd->name));
|
||||
|
||||
sd->internal_ops = &ov965x_sd_internal_ops;
|
||||
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
|
||||
|
|
|
@ -1683,7 +1683,7 @@ static int s5c73m3_probe(struct i2c_client *client,
|
|||
v4l2_subdev_init(sd, &s5c73m3_subdev_ops);
|
||||
sd->owner = client->dev.driver->owner;
|
||||
v4l2_set_subdevdata(sd, state);
|
||||
strlcpy(sd->name, "S5C73M3", sizeof(sd->name));
|
||||
strscpy(sd->name, "S5C73M3", sizeof(sd->name));
|
||||
|
||||
sd->internal_ops = &s5c73m3_internal_ops;
|
||||
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
|
|
|
@ -954,7 +954,7 @@ static int s5k4ecgx_probe(struct i2c_client *client,
|
|||
sd = &priv->sd;
|
||||
/* Registering subdev */
|
||||
v4l2_i2c_subdev_init(sd, client, &s5k4ecgx_ops);
|
||||
strlcpy(sd->name, S5K4ECGX_DRIVER_NAME, sizeof(sd->name));
|
||||
strscpy(sd->name, S5K4ECGX_DRIVER_NAME, sizeof(sd->name));
|
||||
|
||||
sd->internal_ops = &s5k4ecgx_subdev_internal_ops;
|
||||
/* Support v4l2 sub-device user space API */
|
||||
|
|
|
@ -1576,7 +1576,7 @@ static int s5k6aa_probe(struct i2c_client *client,
|
|||
|
||||
sd = &s5k6aa->sd;
|
||||
v4l2_i2c_subdev_init(sd, client, &s5k6aa_subdev_ops);
|
||||
strlcpy(sd->name, DRIVER_NAME, sizeof(sd->name));
|
||||
strscpy(sd->name, DRIVER_NAME, sizeof(sd->name));
|
||||
|
||||
sd->internal_ops = &s5k6aa_subdev_internal_ops;
|
||||
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
|
|
|
@ -1765,7 +1765,7 @@ static int saa711x_detect_chip(struct i2c_client *client,
|
|||
* the lower nibble is a gm7113c.
|
||||
*/
|
||||
|
||||
strlcpy(name, "gm7113c", CHIP_VER_SIZE);
|
||||
strscpy(name, "gm7113c", CHIP_VER_SIZE);
|
||||
|
||||
if (!autodetect && strcmp(name, id->name))
|
||||
return -EINVAL;
|
||||
|
@ -1779,7 +1779,7 @@ static int saa711x_detect_chip(struct i2c_client *client,
|
|||
|
||||
/* Check if it is a CJC7113 */
|
||||
if (!memcmp(name, "1111111111111111", CHIP_VER_SIZE)) {
|
||||
strlcpy(name, "cjc7113", CHIP_VER_SIZE);
|
||||
strscpy(name, "cjc7113", CHIP_VER_SIZE);
|
||||
|
||||
if (!autodetect && strcmp(name, id->name))
|
||||
return -EINVAL;
|
||||
|
@ -1825,7 +1825,7 @@ static int saa711x_probe(struct i2c_client *client,
|
|||
if (ident < 0)
|
||||
return ident;
|
||||
|
||||
strlcpy(client->name, name, sizeof(client->name));
|
||||
strscpy(client->name, name, sizeof(client->name));
|
||||
|
||||
state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL);
|
||||
if (state == NULL)
|
||||
|
|
|
@ -761,10 +761,10 @@ static int saa7127_probe(struct i2c_client *client,
|
|||
saa7127_write(sd, SAA7129_REG_FADE_KEY_COL2,
|
||||
read_result);
|
||||
state->ident = SAA7129;
|
||||
strlcpy(client->name, "saa7129", I2C_NAME_SIZE);
|
||||
strscpy(client->name, "saa7129", I2C_NAME_SIZE);
|
||||
} else {
|
||||
state->ident = SAA7127;
|
||||
strlcpy(client->name, "saa7127", I2C_NAME_SIZE);
|
||||
strscpy(client->name, "saa7127", I2C_NAME_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1981,7 +1981,7 @@ static int tvaudio_probe(struct i2c_client *client, const struct i2c_device_id *
|
|||
|
||||
/* fill required data structures */
|
||||
if (!id)
|
||||
strlcpy(client->name, desc->name, I2C_NAME_SIZE);
|
||||
strscpy(client->name, desc->name, I2C_NAME_SIZE);
|
||||
chip->desc = desc;
|
||||
chip->shadow.count = desc->registers+1;
|
||||
chip->prevmode = -1;
|
||||
|
|
|
@ -352,8 +352,8 @@ static int video_i2c_querycap(struct file *file, void *priv,
|
|||
struct video_i2c_data *data = video_drvdata(file);
|
||||
struct i2c_client *client = data->client;
|
||||
|
||||
strlcpy(vcap->driver, data->v4l2_dev.name, sizeof(vcap->driver));
|
||||
strlcpy(vcap->card, data->vdev.name, sizeof(vcap->card));
|
||||
strscpy(vcap->driver, data->v4l2_dev.name, sizeof(vcap->driver));
|
||||
strscpy(vcap->card, data->vdev.name, sizeof(vcap->card));
|
||||
|
||||
sprintf(vcap->bus_info, "I2C:%d-%d", client->adapter->nr, client->addr);
|
||||
|
||||
|
@ -378,7 +378,7 @@ static int video_i2c_enum_input(struct file *file, void *fh,
|
|||
if (vin->index > 0)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(vin->name, "Camera", sizeof(vin->name));
|
||||
strscpy(vin->name, "Camera", sizeof(vin->name));
|
||||
|
||||
vin->type = V4L2_INPUT_TYPE_CAMERA;
|
||||
|
||||
|
@ -534,7 +534,7 @@ static int video_i2c_probe(struct i2c_client *client,
|
|||
|
||||
data->client = client;
|
||||
v4l2_dev = &data->v4l2_dev;
|
||||
strlcpy(v4l2_dev->name, VIDEO_I2C_DRIVER, sizeof(v4l2_dev->name));
|
||||
strscpy(v4l2_dev->name, VIDEO_I2C_DRIVER, sizeof(v4l2_dev->name));
|
||||
|
||||
ret = v4l2_device_register(&client->dev, v4l2_dev);
|
||||
if (ret < 0)
|
||||
|
|
|
@ -69,14 +69,14 @@ static long media_device_get_info(struct media_device *dev, void *arg)
|
|||
memset(info, 0, sizeof(*info));
|
||||
|
||||
if (dev->driver_name[0])
|
||||
strlcpy(info->driver, dev->driver_name, sizeof(info->driver));
|
||||
strscpy(info->driver, dev->driver_name, sizeof(info->driver));
|
||||
else
|
||||
strlcpy(info->driver, dev->dev->driver->name,
|
||||
strscpy(info->driver, dev->dev->driver->name,
|
||||
sizeof(info->driver));
|
||||
|
||||
strlcpy(info->model, dev->model, sizeof(info->model));
|
||||
strlcpy(info->serial, dev->serial, sizeof(info->serial));
|
||||
strlcpy(info->bus_info, dev->bus_info, sizeof(info->bus_info));
|
||||
strscpy(info->model, dev->model, sizeof(info->model));
|
||||
strscpy(info->serial, dev->serial, sizeof(info->serial));
|
||||
strscpy(info->bus_info, dev->bus_info, sizeof(info->bus_info));
|
||||
|
||||
info->media_version = LINUX_VERSION_CODE;
|
||||
info->driver_version = info->media_version;
|
||||
|
@ -115,7 +115,7 @@ static long media_device_enum_entities(struct media_device *mdev, void *arg)
|
|||
|
||||
entd->id = media_entity_id(ent);
|
||||
if (ent->name)
|
||||
strlcpy(entd->name, ent->name, sizeof(entd->name));
|
||||
strscpy(entd->name, ent->name, sizeof(entd->name));
|
||||
entd->type = ent->function;
|
||||
entd->revision = 0; /* Unused */
|
||||
entd->flags = ent->flags;
|
||||
|
@ -268,7 +268,7 @@ static long media_device_get_topology(struct media_device *mdev, void *arg)
|
|||
kentity.id = entity->graph_obj.id;
|
||||
kentity.function = entity->function;
|
||||
kentity.flags = entity->flags;
|
||||
strlcpy(kentity.name, entity->name,
|
||||
strscpy(kentity.name, entity->name,
|
||||
sizeof(kentity.name));
|
||||
|
||||
if (copy_to_user(uentity, &kentity, sizeof(kentity)))
|
||||
|
@ -836,9 +836,9 @@ void media_device_pci_init(struct media_device *mdev,
|
|||
mdev->dev = &pci_dev->dev;
|
||||
|
||||
if (name)
|
||||
strlcpy(mdev->model, name, sizeof(mdev->model));
|
||||
strscpy(mdev->model, name, sizeof(mdev->model));
|
||||
else
|
||||
strlcpy(mdev->model, pci_name(pci_dev), sizeof(mdev->model));
|
||||
strscpy(mdev->model, pci_name(pci_dev), sizeof(mdev->model));
|
||||
|
||||
sprintf(mdev->bus_info, "PCI:%s", pci_name(pci_dev));
|
||||
|
||||
|
@ -859,17 +859,17 @@ void __media_device_usb_init(struct media_device *mdev,
|
|||
mdev->dev = &udev->dev;
|
||||
|
||||
if (driver_name)
|
||||
strlcpy(mdev->driver_name, driver_name,
|
||||
strscpy(mdev->driver_name, driver_name,
|
||||
sizeof(mdev->driver_name));
|
||||
|
||||
if (board_name)
|
||||
strlcpy(mdev->model, board_name, sizeof(mdev->model));
|
||||
strscpy(mdev->model, board_name, sizeof(mdev->model));
|
||||
else if (udev->product)
|
||||
strlcpy(mdev->model, udev->product, sizeof(mdev->model));
|
||||
strscpy(mdev->model, udev->product, sizeof(mdev->model));
|
||||
else
|
||||
strlcpy(mdev->model, "unknown model", sizeof(mdev->model));
|
||||
strscpy(mdev->model, "unknown model", sizeof(mdev->model));
|
||||
if (udev->serial)
|
||||
strlcpy(mdev->serial, udev->serial, sizeof(mdev->serial));
|
||||
strscpy(mdev->serial, udev->serial, sizeof(mdev->serial));
|
||||
usb_make_path(udev, mdev->bus_info, sizeof(mdev->bus_info));
|
||||
mdev->hw_revision = le16_to_cpu(udev->descriptor.bcdDevice);
|
||||
|
||||
|
|
|
@ -2473,8 +2473,8 @@ static int bttv_querycap(struct file *file, void *priv,
|
|||
if (0 == v4l2)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(cap->driver, "bttv", sizeof(cap->driver));
|
||||
strlcpy(cap->card, btv->video_dev.name, sizeof(cap->card));
|
||||
strscpy(cap->driver, "bttv", sizeof(cap->driver));
|
||||
strscpy(cap->card, btv->video_dev.name, sizeof(cap->card));
|
||||
snprintf(cap->bus_info, sizeof(cap->bus_info),
|
||||
"PCI:%s", pci_name(btv->c.pci));
|
||||
cap->capabilities =
|
||||
|
@ -2535,7 +2535,7 @@ static int bttv_enum_fmt_cap_ovr(struct v4l2_fmtdesc *f)
|
|||
return -EINVAL;
|
||||
|
||||
f->pixelformat = formats[i].fourcc;
|
||||
strlcpy(f->description, formats[i].name, sizeof(f->description));
|
||||
strscpy(f->description, formats[i].name, sizeof(f->description));
|
||||
|
||||
return i;
|
||||
}
|
||||
|
|
|
@ -347,13 +347,13 @@ static void do_i2c_scan(char *name, struct i2c_client *c)
|
|||
/* init + register i2c adapter */
|
||||
int init_bttv_i2c(struct bttv *btv)
|
||||
{
|
||||
strlcpy(btv->i2c_client.name, "bttv internal", I2C_NAME_SIZE);
|
||||
strscpy(btv->i2c_client.name, "bttv internal", I2C_NAME_SIZE);
|
||||
|
||||
if (i2c_hw)
|
||||
btv->use_i2c_hw = 1;
|
||||
if (btv->use_i2c_hw) {
|
||||
/* bt878 */
|
||||
strlcpy(btv->c.i2c_adap.name, "bt878",
|
||||
strscpy(btv->c.i2c_adap.name, "bt878",
|
||||
sizeof(btv->c.i2c_adap.name));
|
||||
btv->c.i2c_adap.algo = &bttv_algo;
|
||||
} else {
|
||||
|
@ -362,7 +362,7 @@ int init_bttv_i2c(struct bttv *btv)
|
|||
if (i2c_udelay<5)
|
||||
i2c_udelay=5;
|
||||
|
||||
strlcpy(btv->c.i2c_adap.name, "bttv",
|
||||
strscpy(btv->c.i2c_adap.name, "bttv",
|
||||
sizeof(btv->c.i2c_adap.name));
|
||||
btv->i2c_algo = bttv_i2c_algo_bit_template;
|
||||
btv->i2c_algo.udelay = i2c_udelay;
|
||||
|
|
|
@ -382,7 +382,7 @@ void init_bttv_i2c_ir(struct bttv *btv)
|
|||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
memset(&btv->init_data, 0, sizeof(btv->init_data));
|
||||
strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "ir_video", I2C_NAME_SIZE);
|
||||
|
||||
switch (btv->c.type) {
|
||||
case BTTV_BOARD_PV951:
|
||||
|
|
|
@ -819,7 +819,8 @@ static int dvb_bt8xx_probe(struct bttv_sub_device *sub)
|
|||
|
||||
mutex_init(&card->lock);
|
||||
card->bttv_nr = sub->core->nr;
|
||||
strlcpy(card->card_name, sub->core->v4l2_dev.name, sizeof(card->card_name));
|
||||
strscpy(card->card_name, sub->core->v4l2_dev.name,
|
||||
sizeof(card->card_name));
|
||||
card->i2c_adapter = &sub->core->i2c_adap;
|
||||
|
||||
switch(sub->core->type) {
|
||||
|
|
|
@ -65,7 +65,7 @@ static int snd_cobalt_card_set_names(struct snd_cobalt_card *cobsc)
|
|||
struct snd_card *sc = cobsc->sc;
|
||||
|
||||
/* sc->driver is used by alsa-lib's configurator: simple, unique */
|
||||
strlcpy(sc->driver, "cobalt", sizeof(sc->driver));
|
||||
strscpy(sc->driver, "cobalt", sizeof(sc->driver));
|
||||
|
||||
/* sc->shortname is a symlink in /proc/asound: COBALT-M -> cardN */
|
||||
snprintf(sc->shortname, sizeof(sc->shortname), "cobalt-%d-%d",
|
||||
|
|
|
@ -557,7 +557,7 @@ int snd_cobalt_pcm_create(struct snd_cobalt_card *cobsc)
|
|||
&snd_cobalt_pcm_capture_ops);
|
||||
sp->info_flags = 0;
|
||||
sp->private_data = cobsc;
|
||||
strlcpy(sp->name, "cobalt", sizeof(sp->name));
|
||||
strscpy(sp->name, "cobalt", sizeof(sp->name));
|
||||
} else {
|
||||
cobalt_s_bit_sysctrl(cobalt,
|
||||
COBALT_SYS_CTRL_AUDIO_OPP_RESETN_BIT, 0);
|
||||
|
@ -581,7 +581,7 @@ int snd_cobalt_pcm_create(struct snd_cobalt_card *cobsc)
|
|||
&snd_cobalt_pcm_playback_ops);
|
||||
sp->info_flags = 0;
|
||||
sp->private_data = cobsc;
|
||||
strlcpy(sp->name, "cobalt", sizeof(sp->name));
|
||||
strscpy(sp->name, "cobalt", sizeof(sp->name));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -479,8 +479,8 @@ static int cobalt_querycap(struct file *file, void *priv_fh,
|
|||
struct cobalt_stream *s = video_drvdata(file);
|
||||
struct cobalt *cobalt = s->cobalt;
|
||||
|
||||
strlcpy(vcap->driver, "cobalt", sizeof(vcap->driver));
|
||||
strlcpy(vcap->card, "cobalt", sizeof(vcap->card));
|
||||
strscpy(vcap->driver, "cobalt", sizeof(vcap->driver));
|
||||
strscpy(vcap->card, "cobalt", sizeof(vcap->card));
|
||||
snprintf(vcap->bus_info, sizeof(vcap->bus_info),
|
||||
"PCIe:%s", pci_name(cobalt->pci_dev));
|
||||
vcap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_READWRITE;
|
||||
|
@ -693,15 +693,15 @@ static int cobalt_enum_fmt_vid_cap(struct file *file, void *priv_fh,
|
|||
{
|
||||
switch (f->index) {
|
||||
case 0:
|
||||
strlcpy(f->description, "YUV 4:2:2", sizeof(f->description));
|
||||
strscpy(f->description, "YUV 4:2:2", sizeof(f->description));
|
||||
f->pixelformat = V4L2_PIX_FMT_YUYV;
|
||||
break;
|
||||
case 1:
|
||||
strlcpy(f->description, "RGB24", sizeof(f->description));
|
||||
strscpy(f->description, "RGB24", sizeof(f->description));
|
||||
f->pixelformat = V4L2_PIX_FMT_RGB24;
|
||||
break;
|
||||
case 2:
|
||||
strlcpy(f->description, "RGB32", sizeof(f->description));
|
||||
strscpy(f->description, "RGB32", sizeof(f->description));
|
||||
f->pixelformat = V4L2_PIX_FMT_BGR32;
|
||||
break;
|
||||
default:
|
||||
|
@ -898,11 +898,11 @@ static int cobalt_enum_fmt_vid_out(struct file *file, void *priv_fh,
|
|||
{
|
||||
switch (f->index) {
|
||||
case 0:
|
||||
strlcpy(f->description, "YUV 4:2:2", sizeof(f->description));
|
||||
strscpy(f->description, "YUV 4:2:2", sizeof(f->description));
|
||||
f->pixelformat = V4L2_PIX_FMT_YUYV;
|
||||
break;
|
||||
case 1:
|
||||
strlcpy(f->description, "RGB32", sizeof(f->description));
|
||||
strscpy(f->description, "RGB32", sizeof(f->description));
|
||||
f->pixelformat = V4L2_PIX_FMT_BGR32;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -112,7 +112,7 @@ static int snd_cx18_card_set_names(struct snd_cx18_card *cxsc)
|
|||
struct snd_card *sc = cxsc->sc;
|
||||
|
||||
/* sc->driver is used by alsa-lib's configurator: simple, unique */
|
||||
strlcpy(sc->driver, "CX23418", sizeof(sc->driver));
|
||||
strscpy(sc->driver, "CX23418", sizeof(sc->driver));
|
||||
|
||||
/* sc->shortname is a symlink in /proc/asound: CX18-M -> cardN */
|
||||
snprintf(sc->shortname, sizeof(sc->shortname), "CX18-%d",
|
||||
|
|
|
@ -345,7 +345,7 @@ int snd_cx18_pcm_create(struct snd_cx18_card *cxsc)
|
|||
&snd_cx18_pcm_capture_ops);
|
||||
sp->info_flags = 0;
|
||||
sp->private_data = cxsc;
|
||||
strlcpy(sp->name, cx->card_name, sizeof(sp->name));
|
||||
strscpy(sp->name, cx->card_name, sizeof(sp->name));
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -602,8 +602,8 @@ int cx18_get_input(struct cx18 *cx, u16 index, struct v4l2_input *input)
|
|||
if (index >= cx->nof_inputs)
|
||||
return -EINVAL;
|
||||
input->index = index;
|
||||
strlcpy(input->name, input_strs[card_input->video_type - 1],
|
||||
sizeof(input->name));
|
||||
strscpy(input->name, input_strs[card_input->video_type - 1],
|
||||
sizeof(input->name));
|
||||
input->type = (card_input->video_type == CX18_CARD_INPUT_VID_TUNER ?
|
||||
V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);
|
||||
input->audioset = (1 << cx->nof_audio_inputs) - 1;
|
||||
|
@ -625,8 +625,8 @@ int cx18_get_audio_input(struct cx18 *cx, u16 index, struct v4l2_audio *audio)
|
|||
memset(audio, 0, sizeof(*audio));
|
||||
if (index >= cx->nof_audio_inputs)
|
||||
return -EINVAL;
|
||||
strlcpy(audio->name, input_strs[aud_input->audio_type - 1],
|
||||
sizeof(audio->name));
|
||||
strscpy(audio->name, input_strs[aud_input->audio_type - 1],
|
||||
sizeof(audio->name));
|
||||
audio->index = index;
|
||||
audio->capability = V4L2_AUDCAP_STEREO;
|
||||
return 0;
|
||||
|
|
|
@ -328,7 +328,7 @@ void cx18_read_eeprom(struct cx18 *cx, struct tveeprom *tv)
|
|||
if (!c)
|
||||
return;
|
||||
|
||||
strlcpy(c->name, "cx18 tveeprom tmp", sizeof(c->name));
|
||||
strscpy(c->name, "cx18 tveeprom tmp", sizeof(c->name));
|
||||
c->adapter = &cx->i2c_adap[0];
|
||||
c->addr = 0xa0 >> 1;
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ static int cx18_i2c_new_ir(struct cx18 *cx, struct i2c_adapter *adap, u32 hw,
|
|||
unsigned short addr_list[2] = { addr, I2C_CLIENT_END };
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, type, I2C_NAME_SIZE);
|
||||
strscpy(info.type, type, I2C_NAME_SIZE);
|
||||
|
||||
/* Our default information for ir-kbd-i2c.c to use */
|
||||
switch (hw) {
|
||||
|
|
|
@ -397,8 +397,8 @@ static int cx18_querycap(struct file *file, void *fh,
|
|||
struct cx18_stream *s = video_drvdata(file);
|
||||
struct cx18 *cx = id->cx;
|
||||
|
||||
strlcpy(vcap->driver, CX18_DRIVER_NAME, sizeof(vcap->driver));
|
||||
strlcpy(vcap->card, cx->card_name, sizeof(vcap->card));
|
||||
strscpy(vcap->driver, CX18_DRIVER_NAME, sizeof(vcap->driver));
|
||||
strscpy(vcap->card, cx->card_name, sizeof(vcap->card));
|
||||
snprintf(vcap->bus_info, sizeof(vcap->bus_info),
|
||||
"PCI:%s", pci_name(cx->pci_dev));
|
||||
vcap->capabilities = cx->v4l2_cap; /* capabilities */
|
||||
|
@ -632,9 +632,9 @@ static int cx18_g_tuner(struct file *file, void *fh, struct v4l2_tuner *vt)
|
|||
cx18_call_all(cx, tuner, g_tuner, vt);
|
||||
|
||||
if (vt->type == V4L2_TUNER_RADIO)
|
||||
strlcpy(vt->name, "cx18 Radio Tuner", sizeof(vt->name));
|
||||
strscpy(vt->name, "cx18 Radio Tuner", sizeof(vt->name));
|
||||
else
|
||||
strlcpy(vt->name, "cx18 TV Tuner", sizeof(vt->name));
|
||||
strscpy(vt->name, "cx18 TV Tuner", sizeof(vt->name));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1329,8 +1329,8 @@ static int vidioc_querycap(struct file *file, void *priv,
|
|||
struct cx23885_dev *dev = video_drvdata(file);
|
||||
struct cx23885_tsport *tsport = &dev->ts1;
|
||||
|
||||
strlcpy(cap->driver, dev->name, sizeof(cap->driver));
|
||||
strlcpy(cap->card, cx23885_boards[tsport->dev->board].name,
|
||||
strscpy(cap->driver, dev->name, sizeof(cap->driver));
|
||||
strscpy(cap->card, cx23885_boards[tsport->dev->board].name,
|
||||
sizeof(cap->card));
|
||||
sprintf(cap->bus_info, "PCIe:%s", pci_name(dev->pci));
|
||||
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
|
||||
|
@ -1349,7 +1349,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
|
|||
if (f->index != 0)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, "MPEG", sizeof(f->description));
|
||||
strscpy(f->description, "MPEG", sizeof(f->description));
|
||||
f->pixelformat = V4L2_PIX_FMT_MPEG;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1165,7 +1165,7 @@ static int dvb_register_ci_mac(struct cx23885_tsport *port)
|
|||
sp2_config.priv = port;
|
||||
sp2_config.ci_control = cx23885_sp2_ci_ctrl;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "sp2", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "sp2", I2C_NAME_SIZE);
|
||||
info.addr = 0x40;
|
||||
info.platform_data = &sp2_config;
|
||||
request_module(info.type);
|
||||
|
@ -1831,7 +1831,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
case 1:
|
||||
/* attach demod + tuner combo */
|
||||
memset(&info, 0, sizeof(info));
|
||||
strlcpy(info.type, "tda10071_cx24118", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "tda10071_cx24118", I2C_NAME_SIZE);
|
||||
info.addr = 0x05;
|
||||
info.platform_data = &tda10071_pdata;
|
||||
request_module("tda10071");
|
||||
|
@ -1848,7 +1848,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
/* attach SEC */
|
||||
a8293_pdata.dvb_frontend = fe0->dvb.frontend;
|
||||
memset(&info, 0, sizeof(info));
|
||||
strlcpy(info.type, "a8293", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "a8293", I2C_NAME_SIZE);
|
||||
info.addr = 0x0b;
|
||||
info.platform_data = &a8293_pdata;
|
||||
request_module("a8293");
|
||||
|
@ -1869,7 +1869,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2165_pdata.chip_mode = SI2165_MODE_PLL_XTAL;
|
||||
si2165_pdata.ref_freq_hz = 16000000;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2165", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2165", I2C_NAME_SIZE);
|
||||
info.addr = 0x64;
|
||||
info.platform_data = &si2165_pdata;
|
||||
request_module(info.type);
|
||||
|
@ -1903,7 +1903,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
|
||||
/* attach demod + tuner combo */
|
||||
memset(&info, 0, sizeof(info));
|
||||
strlcpy(info.type, "tda10071_cx24118", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "tda10071_cx24118", I2C_NAME_SIZE);
|
||||
info.addr = 0x05;
|
||||
info.platform_data = &tda10071_pdata;
|
||||
request_module("tda10071");
|
||||
|
@ -1920,7 +1920,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
/* attach SEC */
|
||||
a8293_pdata.dvb_frontend = fe0->dvb.frontend;
|
||||
memset(&info, 0, sizeof(info));
|
||||
strlcpy(info.type, "a8293", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "a8293", I2C_NAME_SIZE);
|
||||
info.addr = 0x0b;
|
||||
info.platform_data = &a8293_pdata;
|
||||
request_module("a8293");
|
||||
|
@ -1953,7 +1953,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
ts2020_config.fe = fe0->dvb.frontend;
|
||||
ts2020_config.get_agc_pwm = m88ds3103_get_agc_pwm;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "ts2020", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "ts2020", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &ts2020_config;
|
||||
request_module(info.type);
|
||||
|
@ -1990,7 +1990,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2168_config.fe = &fe0->dvb.frontend;
|
||||
si2168_config.ts_mode = SI2168_TS_SERIAL;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
info.addr = 0x64;
|
||||
info.platform_data = &si2168_config;
|
||||
request_module(info.type);
|
||||
|
@ -2009,7 +2009,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2157_config.fe = fe0->dvb.frontend;
|
||||
si2157_config.if_port = 1;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
|
@ -2037,7 +2037,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2168_config.fe = &fe0->dvb.frontend;
|
||||
si2168_config.ts_mode = SI2168_TS_PARALLEL;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
info.addr = 0x64;
|
||||
info.platform_data = &si2168_config;
|
||||
request_module(info.type);
|
||||
|
@ -2055,7 +2055,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2157_config.fe = fe0->dvb.frontend;
|
||||
si2157_config.if_port = 1;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
|
@ -2085,7 +2085,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
ts2020_config.fe = fe0->dvb.frontend;
|
||||
ts2020_config.get_agc_pwm = m88ds3103_get_agc_pwm;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "ts2020", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "ts2020", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &ts2020_config;
|
||||
request_module(info.type);
|
||||
|
@ -2134,7 +2134,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
}
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
strlcpy(info.type, "m88ds3103", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "m88ds3103", I2C_NAME_SIZE);
|
||||
info.addr = 0x68;
|
||||
info.platform_data = &m88ds3103_pdata;
|
||||
request_module(info.type);
|
||||
|
@ -2154,7 +2154,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
ts2020_config.fe = fe0->dvb.frontend;
|
||||
ts2020_config.get_agc_pwm = m88ds3103_get_agc_pwm;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "ts2020", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "ts2020", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &ts2020_config;
|
||||
request_module(info.type);
|
||||
|
@ -2199,7 +2199,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2168_config.i2c_adapter = &adapter;
|
||||
si2168_config.fe = &fe0->dvb.frontend;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
info.addr = 0x64;
|
||||
info.platform_data = &si2168_config;
|
||||
request_module(info.type);
|
||||
|
@ -2217,7 +2217,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2157_config.fe = fe0->dvb.frontend;
|
||||
si2157_config.if_port = 1;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
|
@ -2250,7 +2250,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
/* attach SEC */
|
||||
a8293_pdata.dvb_frontend = fe0->dvb.frontend;
|
||||
memset(&info, 0, sizeof(info));
|
||||
strlcpy(info.type, "a8293", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "a8293", I2C_NAME_SIZE);
|
||||
info.addr = 0x0b;
|
||||
info.platform_data = &a8293_pdata;
|
||||
request_module("a8293");
|
||||
|
@ -2267,7 +2267,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
memset(&m88rs6000t_config, 0, sizeof(m88rs6000t_config));
|
||||
m88rs6000t_config.fe = fe0->dvb.frontend;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "m88rs6000t", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "m88rs6000t", I2C_NAME_SIZE);
|
||||
info.addr = 0x21;
|
||||
info.platform_data = &m88rs6000t_config;
|
||||
request_module("%s", info.type);
|
||||
|
@ -2292,7 +2292,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2168_config.fe = &fe0->dvb.frontend;
|
||||
si2168_config.ts_mode = SI2168_TS_SERIAL;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
info.addr = 0x64;
|
||||
info.platform_data = &si2168_config;
|
||||
request_module("%s", info.type);
|
||||
|
@ -2310,7 +2310,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2157_config.fe = fe0->dvb.frontend;
|
||||
si2157_config.if_port = 1;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module("%s", info.type);
|
||||
|
@ -2345,7 +2345,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2168_config.fe = &fe0->dvb.frontend;
|
||||
si2168_config.ts_mode = SI2168_TS_SERIAL;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
info.addr = 0x64;
|
||||
info.platform_data = &si2168_config;
|
||||
request_module("%s", info.type);
|
||||
|
@ -2363,7 +2363,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2157_config.fe = fe0->dvb.frontend;
|
||||
si2157_config.if_port = 1;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module("%s", info.type);
|
||||
|
@ -2392,7 +2392,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2168_config.fe = &fe0->dvb.frontend;
|
||||
si2168_config.ts_mode = SI2168_TS_SERIAL;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
info.addr = 0x66;
|
||||
info.platform_data = &si2168_config;
|
||||
request_module("%s", info.type);
|
||||
|
@ -2410,7 +2410,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2157_config.fe = fe0->dvb.frontend;
|
||||
si2157_config.if_port = 1;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0x62;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module("%s", info.type);
|
||||
|
@ -2452,7 +2452,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2157_config.if_port = 1;
|
||||
si2157_config.inversion = 1;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module("%s", info.type);
|
||||
|
@ -2488,7 +2488,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2157_config.if_port = 1;
|
||||
si2157_config.inversion = 1;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0x62;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module("%s", info.type);
|
||||
|
@ -2528,7 +2528,7 @@ static int dvb_register(struct cx23885_tsport *port)
|
|||
si2157_config.if_port = 1;
|
||||
si2157_config.inversion = 1;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module("%s", info.type);
|
||||
|
|
|
@ -317,7 +317,7 @@ int cx23885_i2c_register(struct cx23885_i2c *bus)
|
|||
bus->i2c_client = cx23885_i2c_client_template;
|
||||
bus->i2c_adap.dev.parent = &dev->pci->dev;
|
||||
|
||||
strlcpy(bus->i2c_adap.name, bus->dev->name,
|
||||
strscpy(bus->i2c_adap.name, bus->dev->name,
|
||||
sizeof(bus->i2c_adap.name));
|
||||
|
||||
bus->i2c_adap.algo_data = bus;
|
||||
|
@ -345,7 +345,7 @@ int cx23885_i2c_register(struct cx23885_i2c *bus)
|
|||
};
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "ir_video", I2C_NAME_SIZE);
|
||||
/* Use quick read command for probe, some IR chips don't
|
||||
* support writes */
|
||||
i2c_new_probed_device(&bus->i2c_adap, &info, addr_list,
|
||||
|
|
|
@ -31,9 +31,9 @@ int cx23885_g_chip_info(struct file *file, void *fh,
|
|||
if (chip->match.addr == 1) {
|
||||
if (dev->v4l_device == NULL)
|
||||
return -EINVAL;
|
||||
strlcpy(chip->name, "cx23417", sizeof(chip->name));
|
||||
strscpy(chip->name, "cx23417", sizeof(chip->name));
|
||||
} else {
|
||||
strlcpy(chip->name, dev->v4l2_dev.name, sizeof(chip->name));
|
||||
strscpy(chip->name, dev->v4l2_dev.name, sizeof(chip->name));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -640,7 +640,7 @@ static int vidioc_querycap(struct file *file, void *priv,
|
|||
struct video_device *vdev = video_devdata(file);
|
||||
|
||||
strcpy(cap->driver, "cx23885");
|
||||
strlcpy(cap->card, cx23885_boards[dev->board].name,
|
||||
strscpy(cap->card, cx23885_boards[dev->board].name,
|
||||
sizeof(cap->card));
|
||||
sprintf(cap->bus_info, "PCIe:%s", pci_name(dev->pci));
|
||||
cap->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING | V4L2_CAP_AUDIO;
|
||||
|
@ -661,7 +661,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
|
|||
if (unlikely(f->index >= ARRAY_SIZE(formats)))
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, formats[f->index].name,
|
||||
strscpy(f->description, formats[f->index].name,
|
||||
sizeof(f->description));
|
||||
f->pixelformat = formats[f->index].fourcc;
|
||||
|
||||
|
|
|
@ -306,7 +306,7 @@ int cx25821_i2c_register(struct cx25821_i2c *bus)
|
|||
bus->i2c_client = cx25821_i2c_client_template;
|
||||
bus->i2c_adap.dev.parent = &dev->pci->dev;
|
||||
|
||||
strlcpy(bus->i2c_adap.name, bus->dev->name, sizeof(bus->i2c_adap.name));
|
||||
strscpy(bus->i2c_adap.name, bus->dev->name, sizeof(bus->i2c_adap.name));
|
||||
|
||||
bus->i2c_adap.algo_data = bus;
|
||||
i2c_set_adapdata(&bus->i2c_adap, &dev->v4l2_dev);
|
||||
|
|
|
@ -322,7 +322,7 @@ static int cx25821_vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
|
|||
if (unlikely(f->index >= ARRAY_SIZE(formats)))
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, formats[f->index].name, sizeof(f->description));
|
||||
strscpy(f->description, formats[f->index].name, sizeof(f->description));
|
||||
f->pixelformat = formats[f->index].fourcc;
|
||||
|
||||
return 0;
|
||||
|
@ -442,7 +442,7 @@ static int cx25821_vidioc_querycap(struct file *file, void *priv,
|
|||
const u32 cap_output = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_READWRITE;
|
||||
|
||||
strcpy(cap->driver, "cx25821");
|
||||
strlcpy(cap->card, cx25821_boards[dev->board].name, sizeof(cap->card));
|
||||
strscpy(cap->card, cx25821_boards[dev->board].name, sizeof(cap->card));
|
||||
sprintf(cap->bus_info, "PCIe:%s", pci_name(dev->pci));
|
||||
if (chan->id >= VID_CHANNEL_NUM)
|
||||
cap->device_caps = cap_output;
|
||||
|
|
|
@ -814,7 +814,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
|
|||
if (f->index != 0)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, "MPEG", sizeof(f->description));
|
||||
strscpy(f->description, "MPEG", sizeof(f->description));
|
||||
f->pixelformat = V4L2_PIX_FMT_MPEG;
|
||||
f->flags = V4L2_FMT_FLAG_COMPRESSED;
|
||||
return 0;
|
||||
|
|
|
@ -140,14 +140,14 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci)
|
|||
core->i2c_algo = cx8800_i2c_algo_template;
|
||||
|
||||
core->i2c_adap.dev.parent = &pci->dev;
|
||||
strlcpy(core->i2c_adap.name, core->name, sizeof(core->i2c_adap.name));
|
||||
strscpy(core->i2c_adap.name, core->name, sizeof(core->i2c_adap.name));
|
||||
core->i2c_adap.owner = THIS_MODULE;
|
||||
core->i2c_algo.udelay = i2c_udelay;
|
||||
core->i2c_algo.data = core;
|
||||
i2c_set_adapdata(&core->i2c_adap, &core->v4l2_dev);
|
||||
core->i2c_adap.algo_data = &core->i2c_algo;
|
||||
core->i2c_client.adapter = &core->i2c_adap;
|
||||
strlcpy(core->i2c_client.name, "cx88xx internal", I2C_NAME_SIZE);
|
||||
strscpy(core->i2c_client.name, "cx88xx internal", I2C_NAME_SIZE);
|
||||
|
||||
cx8800_bit_setscl(core, 1);
|
||||
cx8800_bit_setsda(core, 1);
|
||||
|
|
|
@ -610,7 +610,7 @@ void cx88_i2c_init_ir(struct cx88_core *core)
|
|||
return;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "ir_video", I2C_NAME_SIZE);
|
||||
|
||||
switch (core->boardnr) {
|
||||
case CX88_BOARD_LEADTEK_PVR2000:
|
||||
|
@ -635,7 +635,7 @@ void cx88_i2c_init_ir(struct cx88_core *core)
|
|||
|
||||
if (*addrp == 0x71) {
|
||||
/* Hauppauge Z8F0811 */
|
||||
strlcpy(info.type, "ir_z8f0811_haup", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "ir_z8f0811_haup", I2C_NAME_SIZE);
|
||||
core->init_data.name = core->board.name;
|
||||
core->init_data.ir_codes = RC_MAP_HAUPPAUGE;
|
||||
core->init_data.type = RC_PROTO_BIT_RC5 |
|
||||
|
|
|
@ -811,7 +811,7 @@ int cx88_querycap(struct file *file, struct cx88_core *core,
|
|||
{
|
||||
struct video_device *vdev = video_devdata(file);
|
||||
|
||||
strlcpy(cap->card, core->board.name, sizeof(cap->card));
|
||||
strscpy(cap->card, core->board.name, sizeof(cap->card));
|
||||
cap->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
|
||||
if (core->board.tuner_type != UNSET)
|
||||
cap->device_caps |= V4L2_CAP_TUNER;
|
||||
|
@ -853,7 +853,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
|
|||
if (unlikely(f->index >= ARRAY_SIZE(formats)))
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, formats[f->index].name, sizeof(f->description));
|
||||
strscpy(f->description, formats[f->index].name, sizeof(f->description));
|
||||
f->pixelformat = formats[f->index].fourcc;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -114,7 +114,7 @@ int vp3054_i2c_probe(struct cx8802_dev *dev)
|
|||
vp3054_i2c->algo = vp3054_i2c_algo_template;
|
||||
|
||||
vp3054_i2c->adap.dev.parent = &dev->pci->dev;
|
||||
strlcpy(vp3054_i2c->adap.name, core->name,
|
||||
strscpy(vp3054_i2c->adap.name, core->name,
|
||||
sizeof(vp3054_i2c->adap.name));
|
||||
vp3054_i2c->adap.owner = THIS_MODULE;
|
||||
vp3054_i2c->algo.data = dev;
|
||||
|
|
|
@ -378,7 +378,7 @@ static int dt3155_enum_input(struct file *filp, void *p,
|
|||
snprintf(input->name, sizeof(input->name), "VID%d",
|
||||
input->index);
|
||||
else
|
||||
strlcpy(input->name, "J2/VID0", sizeof(input->name));
|
||||
strscpy(input->name, "J2/VID0", sizeof(input->name));
|
||||
input->type = V4L2_INPUT_TYPE_CAMERA;
|
||||
input->std = V4L2_STD_ALL;
|
||||
input->status = 0;
|
||||
|
|
|
@ -1064,8 +1064,8 @@ static int cio2_v4l2_querycap(struct file *file, void *fh,
|
|||
{
|
||||
struct cio2_device *cio2 = video_drvdata(file);
|
||||
|
||||
strlcpy(cap->driver, CIO2_NAME, sizeof(cap->driver));
|
||||
strlcpy(cap->card, CIO2_DEVICE_NAME, sizeof(cap->card));
|
||||
strscpy(cap->driver, CIO2_NAME, sizeof(cap->driver));
|
||||
strscpy(cap->card, CIO2_DEVICE_NAME, sizeof(cap->card));
|
||||
snprintf(cap->bus_info, sizeof(cap->bus_info),
|
||||
"PCI:%s", pci_name(cio2->pci_dev));
|
||||
|
||||
|
@ -1143,7 +1143,7 @@ cio2_video_enum_input(struct file *file, void *fh, struct v4l2_input *input)
|
|||
if (input->index > 0)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(input->name, "camera", sizeof(input->name));
|
||||
strscpy(input->name, "camera", sizeof(input->name));
|
||||
input->type = V4L2_INPUT_TYPE_CAMERA;
|
||||
|
||||
return 0;
|
||||
|
@ -1783,7 +1783,7 @@ static int cio2_pci_probe(struct pci_dev *pci_dev,
|
|||
mutex_init(&cio2->lock);
|
||||
|
||||
cio2->media_dev.dev = &cio2->pci_dev->dev;
|
||||
strlcpy(cio2->media_dev.model, CIO2_DEVICE_NAME,
|
||||
strscpy(cio2->media_dev.model, CIO2_DEVICE_NAME,
|
||||
sizeof(cio2->media_dev.model));
|
||||
snprintf(cio2->media_dev.bus_info, sizeof(cio2->media_dev.bus_info),
|
||||
"PCI:%s", pci_name(cio2->pci_dev));
|
||||
|
|
|
@ -109,7 +109,7 @@ static int snd_ivtv_card_set_names(struct snd_ivtv_card *itvsc)
|
|||
struct snd_card *sc = itvsc->sc;
|
||||
|
||||
/* sc->driver is used by alsa-lib's configurator: simple, unique */
|
||||
strlcpy(sc->driver, "CX2341[56]", sizeof(sc->driver));
|
||||
strscpy(sc->driver, "CX2341[56]", sizeof(sc->driver));
|
||||
|
||||
/* sc->shortname is a symlink in /proc/asound: IVTV-M -> cardN */
|
||||
snprintf(sc->shortname, sizeof(sc->shortname), "IVTV-%d",
|
||||
|
|
|
@ -350,7 +350,7 @@ int snd_ivtv_pcm_create(struct snd_ivtv_card *itvsc)
|
|||
&snd_ivtv_pcm_capture_ops);
|
||||
sp->info_flags = 0;
|
||||
sp->private_data = itvsc;
|
||||
strlcpy(sp->name, itv->card_name, sizeof(sp->name));
|
||||
strscpy(sp->name, itv->card_name, sizeof(sp->name));
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -1317,8 +1317,8 @@ int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input)
|
|||
if (index >= itv->nof_inputs)
|
||||
return -EINVAL;
|
||||
input->index = index;
|
||||
strlcpy(input->name, input_strs[card_input->video_type - 1],
|
||||
sizeof(input->name));
|
||||
strscpy(input->name, input_strs[card_input->video_type - 1],
|
||||
sizeof(input->name));
|
||||
input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ?
|
||||
V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);
|
||||
input->audioset = (1 << itv->nof_audio_inputs) - 1;
|
||||
|
@ -1334,7 +1334,7 @@ int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output)
|
|||
if (index >= itv->card->nof_outputs)
|
||||
return -EINVAL;
|
||||
output->index = index;
|
||||
strlcpy(output->name, card_output->name, sizeof(output->name));
|
||||
strscpy(output->name, card_output->name, sizeof(output->name));
|
||||
output->type = V4L2_OUTPUT_TYPE_ANALOG;
|
||||
output->audioset = 1;
|
||||
output->std = V4L2_STD_ALL;
|
||||
|
@ -1353,8 +1353,8 @@ int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *audio)
|
|||
memset(audio, 0, sizeof(*audio));
|
||||
if (index >= itv->nof_audio_inputs)
|
||||
return -EINVAL;
|
||||
strlcpy(audio->name, input_strs[aud_input->audio_type - 1],
|
||||
sizeof(audio->name));
|
||||
strscpy(audio->name, input_strs[aud_input->audio_type - 1],
|
||||
sizeof(audio->name));
|
||||
audio->index = index;
|
||||
audio->capability = V4L2_AUDCAP_STEREO;
|
||||
return 0;
|
||||
|
@ -1365,6 +1365,6 @@ int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *aud
|
|||
memset(aud_output, 0, sizeof(*aud_output));
|
||||
if (itv->card->video_outputs == NULL || index != 0)
|
||||
return -EINVAL;
|
||||
strlcpy(aud_output->name, "A/V Audio Out", sizeof(aud_output->name));
|
||||
strscpy(aud_output->name, "A/V Audio Out", sizeof(aud_output->name));
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@ static int ivtv_i2c_new_ir(struct ivtv *itv, u32 hw, const char *type, u8 addr)
|
|||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
info.platform_data = init_data;
|
||||
strlcpy(info.type, type, I2C_NAME_SIZE);
|
||||
strscpy(info.type, type, I2C_NAME_SIZE);
|
||||
|
||||
return i2c_new_probed_device(adap, &info, addr_list, NULL) == NULL ?
|
||||
-1 : 0;
|
||||
|
@ -246,7 +246,7 @@ struct i2c_client *ivtv_i2c_new_ir_legacy(struct ivtv *itv)
|
|||
};
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "ir_video", I2C_NAME_SIZE);
|
||||
return i2c_new_probed_device(&itv->i2c_adap, &info, addr_list, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -747,8 +747,8 @@ static int ivtv_querycap(struct file *file, void *fh, struct v4l2_capability *vc
|
|||
struct ivtv *itv = id->itv;
|
||||
struct ivtv_stream *s = &itv->streams[id->type];
|
||||
|
||||
strlcpy(vcap->driver, IVTV_DRIVER_NAME, sizeof(vcap->driver));
|
||||
strlcpy(vcap->card, itv->card_name, sizeof(vcap->card));
|
||||
strscpy(vcap->driver, IVTV_DRIVER_NAME, sizeof(vcap->driver));
|
||||
strscpy(vcap->card, itv->card_name, sizeof(vcap->card));
|
||||
snprintf(vcap->bus_info, sizeof(vcap->bus_info), "PCI:%s", pci_name(itv->pdev));
|
||||
vcap->capabilities = itv->v4l2_cap | V4L2_CAP_DEVICE_CAPS;
|
||||
vcap->device_caps = s->caps;
|
||||
|
@ -1227,9 +1227,9 @@ static int ivtv_g_tuner(struct file *file, void *fh, struct v4l2_tuner *vt)
|
|||
ivtv_call_all(itv, tuner, g_tuner, vt);
|
||||
|
||||
if (vt->type == V4L2_TUNER_RADIO)
|
||||
strlcpy(vt->name, "ivtv Radio Tuner", sizeof(vt->name));
|
||||
strscpy(vt->name, "ivtv Radio Tuner", sizeof(vt->name));
|
||||
else
|
||||
strlcpy(vt->name, "ivtv TV Tuner", sizeof(vt->name));
|
||||
strscpy(vt->name, "ivtv TV Tuner", sizeof(vt->name));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -624,7 +624,7 @@ static int ivtvfb_get_fix(struct ivtv *itv, struct fb_fix_screeninfo *fix)
|
|||
|
||||
IVTVFB_DEBUG_INFO("ivtvfb_get_fix\n");
|
||||
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
|
||||
strlcpy(fix->id, "cx23415 TV out", sizeof(fix->id));
|
||||
strscpy(fix->id, "cx23415 TV out", sizeof(fix->id));
|
||||
fix->smem_start = oi->video_pbase;
|
||||
fix->smem_len = oi->video_buffer_size;
|
||||
fix->type = FB_TYPE_PACKED_PIXELS;
|
||||
|
|
|
@ -765,7 +765,7 @@ static int pt3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
i2c->algo = &pt3_i2c_algo;
|
||||
i2c->algo_data = NULL;
|
||||
i2c->dev.parent = &pdev->dev;
|
||||
strlcpy(i2c->name, DRV_NAME, sizeof(i2c->name));
|
||||
strscpy(i2c->name, DRV_NAME, sizeof(i2c->name));
|
||||
i2c_set_adapdata(i2c, pt3);
|
||||
ret = i2c_add_adapter(i2c);
|
||||
if (ret < 0)
|
||||
|
|
|
@ -100,7 +100,7 @@ static int empress_enum_fmt_vid_cap(struct file *file, void *priv,
|
|||
if (f->index != 0)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, "MPEG TS", sizeof(f->description));
|
||||
strscpy(f->description, "MPEG TS", sizeof(f->description));
|
||||
f->pixelformat = V4L2_PIX_FMT_MPEG;
|
||||
f->flags = V4L2_FMT_FLAG_COMPRESSED;
|
||||
return 0;
|
||||
|
|
|
@ -435,7 +435,7 @@ static int saa7134_go7007_init(struct saa7134_dev *dev)
|
|||
|
||||
go->board_id = GO7007_BOARDID_PCI_VOYAGER;
|
||||
snprintf(go->bus_info, sizeof(go->bus_info), "PCI:%s", pci_name(dev->pci));
|
||||
strlcpy(go->name, saa7134_boards[dev->board].name, sizeof(go->name));
|
||||
strscpy(go->name, saa7134_boards[dev->board].name, sizeof(go->name));
|
||||
go->hpi_ops = &saa7134_go7007_hpi_ops;
|
||||
go->hpi_context = saa;
|
||||
saa->dev = dev;
|
||||
|
|
|
@ -953,7 +953,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
|
|||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
memset(&dev->init_data, 0, sizeof(dev->init_data));
|
||||
strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "ir_video", I2C_NAME_SIZE);
|
||||
|
||||
switch (dev->board) {
|
||||
case SAA7134_BOARD_PINNACLE_PCTV_110i:
|
||||
|
|
|
@ -1503,7 +1503,7 @@ int saa7134_querycap(struct file *file, void *priv,
|
|||
unsigned int tuner_type = dev->tuner_type;
|
||||
|
||||
strcpy(cap->driver, "saa7134");
|
||||
strlcpy(cap->card, saa7134_boards[dev->board].name,
|
||||
strscpy(cap->card, saa7134_boards[dev->board].name,
|
||||
sizeof(cap->card));
|
||||
sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci));
|
||||
|
||||
|
@ -1819,7 +1819,7 @@ static int saa7134_enum_fmt_vid_cap(struct file *file, void *priv,
|
|||
if (f->index >= FORMATS)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, formats[f->index].name,
|
||||
strscpy(f->description, formats[f->index].name,
|
||||
sizeof(f->description));
|
||||
|
||||
f->pixelformat = formats[f->index].fourcc;
|
||||
|
@ -1838,7 +1838,7 @@ static int saa7134_enum_fmt_vid_overlay(struct file *file, void *priv,
|
|||
if ((f->index >= FORMATS) || formats[f->index].planar)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, formats[f->index].name,
|
||||
strscpy(f->description, formats[f->index].name,
|
||||
sizeof(f->description));
|
||||
|
||||
f->pixelformat = formats[f->index].fourcc;
|
||||
|
|
|
@ -553,7 +553,7 @@ static int vidioc_g_tuner(struct file *file, void *fh, struct v4l2_tuner *t)
|
|||
DEB_EE("VIDIOC_G_TUNER: %d\n", t->index);
|
||||
|
||||
memset(t, 0, sizeof(*t));
|
||||
strlcpy(t->name, "TV Tuner", sizeof(t->name));
|
||||
strscpy(t->name, "TV Tuner", sizeof(t->name));
|
||||
t->type = V4L2_TUNER_ANALOG_TV;
|
||||
t->capability = V4L2_TUNER_CAP_NORM | V4L2_TUNER_CAP_STEREO |
|
||||
V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2 | V4L2_TUNER_CAP_SAP;
|
||||
|
|
|
@ -120,7 +120,7 @@ static int si2157_attach(struct saa7164_port *port, struct i2c_adapter *adapter,
|
|||
|
||||
memset(&bi, 0, sizeof(bi));
|
||||
|
||||
strlcpy(bi.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(bi.type, "si2157", I2C_NAME_SIZE);
|
||||
bi.platform_data = cfg;
|
||||
bi.addr = addr8bit >> 1;
|
||||
|
||||
|
@ -643,7 +643,7 @@ int saa7164_dvb_register(struct saa7164_port *port)
|
|||
si2168_config.fe = &port->dvb.frontend;
|
||||
si2168_config.ts_mode = SI2168_TS_SERIAL;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
info.addr = 0xc8 >> 1;
|
||||
info.platform_data = &si2168_config;
|
||||
request_module(info.type);
|
||||
|
@ -663,7 +663,7 @@ int saa7164_dvb_register(struct saa7164_port *port)
|
|||
si2157_config.if_port = 1;
|
||||
si2157_config.fe = port->dvb.frontend;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0xc0 >> 1;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
|
@ -688,7 +688,7 @@ int saa7164_dvb_register(struct saa7164_port *port)
|
|||
si2168_config.fe = &port->dvb.frontend;
|
||||
si2168_config.ts_mode = SI2168_TS_SERIAL;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
info.addr = 0xcc >> 1;
|
||||
info.platform_data = &si2168_config;
|
||||
request_module(info.type);
|
||||
|
@ -708,7 +708,7 @@ int saa7164_dvb_register(struct saa7164_port *port)
|
|||
si2157_config.fe = port->dvb.frontend;
|
||||
si2157_config.if_port = 1;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0xc0 >> 1;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
|
|
|
@ -498,7 +498,7 @@ static int vidioc_querycap(struct file *file, void *priv,
|
|||
struct saa7164_dev *dev = port->dev;
|
||||
|
||||
strcpy(cap->driver, dev->name);
|
||||
strlcpy(cap->card, saa7164_boards[dev->board].name,
|
||||
strscpy(cap->card, saa7164_boards[dev->board].name,
|
||||
sizeof(cap->card));
|
||||
sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci));
|
||||
|
||||
|
@ -520,7 +520,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
|
|||
if (f->index != 0)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, "MPEG", sizeof(f->description));
|
||||
strscpy(f->description, "MPEG", sizeof(f->description));
|
||||
f->pixelformat = V4L2_PIX_FMT_MPEG;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -99,7 +99,7 @@ int saa7164_i2c_register(struct saa7164_i2c *bus)
|
|||
|
||||
bus->i2c_adap.dev.parent = &dev->pci->dev;
|
||||
|
||||
strlcpy(bus->i2c_adap.name, bus->dev->name,
|
||||
strscpy(bus->i2c_adap.name, bus->dev->name,
|
||||
sizeof(bus->i2c_adap.name));
|
||||
|
||||
bus->i2c_adap.algo_data = bus;
|
||||
|
|
|
@ -209,7 +209,7 @@ static int vidioc_querycap(struct file *file, void *priv,
|
|||
struct saa7164_dev *dev = port->dev;
|
||||
|
||||
strcpy(cap->driver, dev->name);
|
||||
strlcpy(cap->card, saa7164_boards[dev->board].name,
|
||||
strscpy(cap->card, saa7164_boards[dev->board].name,
|
||||
sizeof(cap->card));
|
||||
sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci));
|
||||
|
||||
|
|
|
@ -549,7 +549,7 @@ static int smi_dvbsky_m88ds3103_fe_attach(struct smi_port *port)
|
|||
}
|
||||
/* attach tuner */
|
||||
ts2020_config.fe = port->fe;
|
||||
strlcpy(tuner_info.type, "ts2020", I2C_NAME_SIZE);
|
||||
strscpy(tuner_info.type, "ts2020", I2C_NAME_SIZE);
|
||||
tuner_info.addr = 0x60;
|
||||
tuner_info.platform_data = &ts2020_config;
|
||||
tuner_client = smi_add_i2c_client(tuner_i2c_adapter, &tuner_info);
|
||||
|
@ -605,7 +605,7 @@ static int smi_dvbsky_m88rs6000_fe_attach(struct smi_port *port)
|
|||
}
|
||||
/* attach tuner */
|
||||
m88rs6000t_config.fe = port->fe;
|
||||
strlcpy(tuner_info.type, "m88rs6000t", I2C_NAME_SIZE);
|
||||
strscpy(tuner_info.type, "m88rs6000t", I2C_NAME_SIZE);
|
||||
tuner_info.addr = 0x21;
|
||||
tuner_info.platform_data = &m88rs6000t_config;
|
||||
tuner_client = smi_add_i2c_client(tuner_i2c_adapter, &tuner_info);
|
||||
|
@ -647,7 +647,7 @@ static int smi_dvbsky_sit2_fe_attach(struct smi_port *port)
|
|||
si2168_config.ts_mode = SI2168_TS_PARALLEL;
|
||||
|
||||
memset(&client_info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(client_info.type, "si2168", I2C_NAME_SIZE);
|
||||
strscpy(client_info.type, "si2168", I2C_NAME_SIZE);
|
||||
client_info.addr = 0x64;
|
||||
client_info.platform_data = &si2168_config;
|
||||
|
||||
|
@ -664,7 +664,7 @@ static int smi_dvbsky_sit2_fe_attach(struct smi_port *port)
|
|||
si2157_config.if_port = 1;
|
||||
|
||||
memset(&client_info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(client_info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(client_info.type, "si2157", I2C_NAME_SIZE);
|
||||
client_info.addr = 0x60;
|
||||
client_info.platform_data = &si2157_config;
|
||||
|
||||
|
|
|
@ -470,7 +470,7 @@ static int solo_enum_fmt_cap(struct file *file, void *priv,
|
|||
return -EINVAL;
|
||||
|
||||
f->pixelformat = V4L2_PIX_FMT_UYVY;
|
||||
strlcpy(f->description, "UYUV 4:2:2 Packed", sizeof(f->description));
|
||||
strscpy(f->description, "UYUV 4:2:2 Packed", sizeof(f->description));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -2482,7 +2482,8 @@ static int av7110_attach(struct saa7146_dev* dev,
|
|||
get recognized before the main driver is fully loaded */
|
||||
saa7146_write(dev, GPIO_CTRL, 0x500000);
|
||||
|
||||
strlcpy(av7110->i2c_adap.name, pci_ext->ext_priv, sizeof(av7110->i2c_adap.name));
|
||||
strscpy(av7110->i2c_adap.name, pci_ext->ext_priv,
|
||||
sizeof(av7110->i2c_adap.name));
|
||||
|
||||
saa7146_i2c_adapter_prepare(dev, &av7110->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120); /* 275 kHz */
|
||||
|
||||
|
|
|
@ -504,7 +504,8 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
|
|||
if (bi->type != BUDGET_FS_ACTIVY)
|
||||
saa7146_write(dev, GPIO_CTRL, 0x500000); /* GPIO 3 = 1 */
|
||||
|
||||
strlcpy(budget->i2c_adap.name, budget->card->name, sizeof(budget->i2c_adap.name));
|
||||
strscpy(budget->i2c_adap.name, budget->card->name,
|
||||
sizeof(budget->i2c_adap.name));
|
||||
|
||||
saa7146_i2c_adapter_prepare(dev, &budget->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120);
|
||||
strcpy(budget->i2c_adap.name, budget->card->name);
|
||||
|
|
|
@ -735,7 +735,7 @@ static int tw68_querycap(struct file *file, void *priv,
|
|||
struct tw68_dev *dev = video_drvdata(file);
|
||||
|
||||
strcpy(cap->driver, "tw68");
|
||||
strlcpy(cap->card, "Techwell Capture Card",
|
||||
strscpy(cap->card, "Techwell Capture Card",
|
||||
sizeof(cap->card));
|
||||
sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci));
|
||||
cap->device_caps =
|
||||
|
@ -789,7 +789,7 @@ static int tw68_enum_fmt_vid_cap(struct file *file, void *priv,
|
|||
if (f->index >= FORMATS)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, formats[f->index].name,
|
||||
strscpy(f->description, formats[f->index].name,
|
||||
sizeof(f->description));
|
||||
|
||||
f->pixelformat = formats[f->index].fourcc;
|
||||
|
|
|
@ -295,7 +295,7 @@ static int tw686x_snd_pcm_init(struct tw686x_dev *dev)
|
|||
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &tw686x_pcm_ops);
|
||||
snd_pcm_chip(pcm) = dev;
|
||||
pcm->info_flags = 0;
|
||||
strlcpy(pcm->name, "tw686x PCM", sizeof(pcm->name));
|
||||
strscpy(pcm->name, "tw686x PCM", sizeof(pcm->name));
|
||||
|
||||
for (i = 0, ss = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream;
|
||||
ss; ss = ss->next, i++)
|
||||
|
@ -390,9 +390,9 @@ int tw686x_audio_init(struct tw686x_dev *dev)
|
|||
return err;
|
||||
|
||||
dev->snd_card = card;
|
||||
strlcpy(card->driver, "tw686x", sizeof(card->driver));
|
||||
strlcpy(card->shortname, "tw686x", sizeof(card->shortname));
|
||||
strlcpy(card->longname, pci_name(pci_dev), sizeof(card->longname));
|
||||
strscpy(card->driver, "tw686x", sizeof(card->driver));
|
||||
strscpy(card->shortname, "tw686x", sizeof(card->shortname));
|
||||
strscpy(card->longname, pci_name(pci_dev), sizeof(card->longname));
|
||||
snd_card_set_dev(card, &pci_dev->dev);
|
||||
|
||||
for (ch = 0; ch < max_channels(dev); ch++) {
|
||||
|
|
|
@ -765,8 +765,8 @@ static int tw686x_querycap(struct file *file, void *priv,
|
|||
struct tw686x_video_channel *vc = video_drvdata(file);
|
||||
struct tw686x_dev *dev = vc->dev;
|
||||
|
||||
strlcpy(cap->driver, "tw686x", sizeof(cap->driver));
|
||||
strlcpy(cap->card, dev->name, sizeof(cap->card));
|
||||
strscpy(cap->driver, "tw686x", sizeof(cap->driver));
|
||||
strscpy(cap->card, dev->name, sizeof(cap->card));
|
||||
snprintf(cap->bus_info, sizeof(cap->bus_info),
|
||||
"PCI:%s", pci_name(dev->pci_dev));
|
||||
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
|
||||
|
|
|
@ -1408,8 +1408,8 @@ static int vpfe_querycap(struct file *file, void *priv,
|
|||
|
||||
vpfe_dbg(2, vpfe, "vpfe_querycap\n");
|
||||
|
||||
strlcpy(cap->driver, VPFE_MODULE_NAME, sizeof(cap->driver));
|
||||
strlcpy(cap->card, "TI AM437x VPFE", sizeof(cap->card));
|
||||
strscpy(cap->driver, VPFE_MODULE_NAME, sizeof(cap->driver));
|
||||
strscpy(cap->card, "TI AM437x VPFE", sizeof(cap->card));
|
||||
snprintf(cap->bus_info, sizeof(cap->bus_info),
|
||||
"platform:%s", vpfe->v4l2_dev.name);
|
||||
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
|
||||
|
@ -2386,7 +2386,7 @@ static int vpfe_probe_complete(struct vpfe_device *vpfe)
|
|||
INIT_LIST_HEAD(&vpfe->dma_queue);
|
||||
|
||||
vdev = &vpfe->video_dev;
|
||||
strlcpy(vdev->name, VPFE_MODULE_NAME, sizeof(vdev->name));
|
||||
strscpy(vdev->name, VPFE_MODULE_NAME, sizeof(vdev->name));
|
||||
vdev->release = video_device_release_empty;
|
||||
vdev->fops = &vpfe_fops;
|
||||
vdev->ioctl_ops = &vpfe_ioctl_ops;
|
||||
|
|
|
@ -1951,7 +1951,7 @@ static int isc_async_complete(struct v4l2_async_notifier *notifier)
|
|||
INIT_WORK(&isc->awb_work, isc_awb_work);
|
||||
|
||||
/* Register video device */
|
||||
strlcpy(vdev->name, ATMEL_ISC_NAME, sizeof(vdev->name));
|
||||
strscpy(vdev->name, ATMEL_ISC_NAME, sizeof(vdev->name));
|
||||
vdev->release = video_device_release_empty;
|
||||
vdev->fops = &isc_fops;
|
||||
vdev->ioctl_ops = &isc_ioctl_ops;
|
||||
|
|
|
@ -655,9 +655,9 @@ static int isi_enum_fmt_vid_cap(struct file *file, void *priv,
|
|||
static int isi_querycap(struct file *file, void *priv,
|
||||
struct v4l2_capability *cap)
|
||||
{
|
||||
strlcpy(cap->driver, "atmel-isi", sizeof(cap->driver));
|
||||
strlcpy(cap->card, "Atmel Image Sensor Interface", sizeof(cap->card));
|
||||
strlcpy(cap->bus_info, "platform:isi", sizeof(cap->bus_info));
|
||||
strscpy(cap->driver, "atmel-isi", sizeof(cap->driver));
|
||||
strscpy(cap->card, "Atmel Image Sensor Interface", sizeof(cap->card));
|
||||
strscpy(cap->bus_info, "platform:isi", sizeof(cap->bus_info));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -668,7 +668,7 @@ static int isi_enum_input(struct file *file, void *priv,
|
|||
return -EINVAL;
|
||||
|
||||
i->type = V4L2_INPUT_TYPE_CAMERA;
|
||||
strlcpy(i->name, "Camera", sizeof(i->name));
|
||||
strscpy(i->name, "Camera", sizeof(i->name));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1202,7 +1202,7 @@ static int atmel_isi_probe(struct platform_device *pdev)
|
|||
isi->vdev->fops = &isi_fops;
|
||||
isi->vdev->v4l2_dev = &isi->v4l2_dev;
|
||||
isi->vdev->queue = &isi->queue;
|
||||
strlcpy(isi->vdev->name, KBUILD_MODNAME, sizeof(isi->vdev->name));
|
||||
strscpy(isi->vdev->name, KBUILD_MODNAME, sizeof(isi->vdev->name));
|
||||
isi->vdev->release = video_device_release;
|
||||
isi->vdev->ioctl_ops = &isi_ioctl_ops;
|
||||
isi->vdev->lock = &isi->lock;
|
||||
|
|
|
@ -390,10 +390,10 @@ static int coda_querycap(struct file *file, void *priv,
|
|||
{
|
||||
struct coda_ctx *ctx = fh_to_ctx(priv);
|
||||
|
||||
strlcpy(cap->driver, CODA_NAME, sizeof(cap->driver));
|
||||
strlcpy(cap->card, coda_product_name(ctx->dev->devtype->product),
|
||||
strscpy(cap->driver, CODA_NAME, sizeof(cap->driver));
|
||||
strscpy(cap->card, coda_product_name(ctx->dev->devtype->product),
|
||||
sizeof(cap->card));
|
||||
strlcpy(cap->bus_info, "platform:" CODA_NAME, sizeof(cap->bus_info));
|
||||
strscpy(cap->bus_info, "platform:" CODA_NAME, sizeof(cap->bus_info));
|
||||
cap->device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING;
|
||||
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
|
||||
|
||||
|
@ -2408,7 +2408,7 @@ static int coda_register_device(struct coda_dev *dev, int i)
|
|||
if (i >= dev->devtype->num_vdevs)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(vfd->name, dev->devtype->vdevs[i]->name, sizeof(vfd->name));
|
||||
strscpy(vfd->name, dev->devtype->vdevs[i]->name, sizeof(vfd->name));
|
||||
vfd->fops = &coda_fops;
|
||||
vfd->ioctl_ops = &coda_ioctl_ops;
|
||||
vfd->release = video_device_release_empty,
|
||||
|
|
|
@ -647,7 +647,7 @@ static int vpbe_display_querycap(struct file *file, void *priv,
|
|||
dev_name(vpbe_dev->pdev));
|
||||
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
|
||||
dev_name(vpbe_dev->pdev));
|
||||
strlcpy(cap->card, vpbe_dev->cfg->module_name, sizeof(cap->card));
|
||||
strscpy(cap->card, vpbe_dev->cfg->module_name, sizeof(cap->card));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -889,9 +889,9 @@ static int vpfe_querycap(struct file *file, void *priv,
|
|||
|
||||
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
|
||||
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
|
||||
strlcpy(cap->driver, CAPTURE_DRV_NAME, sizeof(cap->driver));
|
||||
strlcpy(cap->bus_info, "VPFE", sizeof(cap->bus_info));
|
||||
strlcpy(cap->card, vpfe_dev->cfg->card_name, sizeof(cap->card));
|
||||
strscpy(cap->driver, CAPTURE_DRV_NAME, sizeof(cap->driver));
|
||||
strscpy(cap->bus_info, "VPFE", sizeof(cap->bus_info));
|
||||
strscpy(cap->card, vpfe_dev->cfg->card_name, sizeof(cap->card));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1094,10 +1094,10 @@ static int vpif_querycap(struct file *file, void *priv,
|
|||
|
||||
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
|
||||
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
|
||||
strlcpy(cap->driver, VPIF_DRIVER_NAME, sizeof(cap->driver));
|
||||
strscpy(cap->driver, VPIF_DRIVER_NAME, sizeof(cap->driver));
|
||||
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
|
||||
dev_name(vpif_dev));
|
||||
strlcpy(cap->card, config->card_name, sizeof(cap->card));
|
||||
strscpy(cap->card, config->card_name, sizeof(cap->card));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1463,7 +1463,7 @@ static int vpif_probe_complete(void)
|
|||
|
||||
/* Initialize the video_device structure */
|
||||
vdev = &ch->video_dev;
|
||||
strlcpy(vdev->name, VPIF_DRIVER_NAME, sizeof(vdev->name));
|
||||
strscpy(vdev->name, VPIF_DRIVER_NAME, sizeof(vdev->name));
|
||||
vdev->release = video_device_release_empty;
|
||||
vdev->fops = &vpif_fops;
|
||||
vdev->ioctl_ops = &vpif_ioctl_ops;
|
||||
|
|
|
@ -586,10 +586,10 @@ static int vpif_querycap(struct file *file, void *priv,
|
|||
|
||||
cap->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING;
|
||||
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
|
||||
strlcpy(cap->driver, VPIF_DRIVER_NAME, sizeof(cap->driver));
|
||||
strscpy(cap->driver, VPIF_DRIVER_NAME, sizeof(cap->driver));
|
||||
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
|
||||
dev_name(vpif_dev));
|
||||
strlcpy(cap->card, config->card_name, sizeof(cap->card));
|
||||
strscpy(cap->card, config->card_name, sizeof(cap->card));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1209,7 +1209,7 @@ static int vpif_probe_complete(void)
|
|||
|
||||
/* Initialize the video_device structure */
|
||||
vdev = &ch->video_dev;
|
||||
strlcpy(vdev->name, VPIF_DRIVER_NAME, sizeof(vdev->name));
|
||||
strscpy(vdev->name, VPIF_DRIVER_NAME, sizeof(vdev->name));
|
||||
vdev->release = video_device_release_empty;
|
||||
vdev->fops = &vpif_fops;
|
||||
vdev->ioctl_ops = &vpif_ioctl_ops;
|
||||
|
|
|
@ -339,7 +339,7 @@ int gsc_enum_fmt_mplane(struct v4l2_fmtdesc *f)
|
|||
if (!fmt)
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, fmt->name, sizeof(f->description));
|
||||
strscpy(f->description, fmt->name, sizeof(f->description));
|
||||
f->pixelformat = fmt->pixelformat;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -294,8 +294,8 @@ static int gsc_m2m_querycap(struct file *file, void *fh,
|
|||
struct gsc_ctx *ctx = fh_to_ctx(fh);
|
||||
struct gsc_dev *gsc = ctx->gsc_dev;
|
||||
|
||||
strlcpy(cap->driver, GSC_MODULE_NAME, sizeof(cap->driver));
|
||||
strlcpy(cap->card, GSC_MODULE_NAME " gscaler", sizeof(cap->card));
|
||||
strscpy(cap->driver, GSC_MODULE_NAME, sizeof(cap->driver));
|
||||
strscpy(cap->card, GSC_MODULE_NAME " gscaler", sizeof(cap->card));
|
||||
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
|
||||
dev_name(&gsc->pdev->dev));
|
||||
cap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M_MPLANE;
|
||||
|
|
|
@ -40,8 +40,8 @@ EXPORT_SYMBOL(fimc_find_remote_sensor);
|
|||
void __fimc_vidioc_querycap(struct device *dev, struct v4l2_capability *cap,
|
||||
unsigned int caps)
|
||||
{
|
||||
strlcpy(cap->driver, dev->driver->name, sizeof(cap->driver));
|
||||
strlcpy(cap->card, dev->driver->name, sizeof(cap->card));
|
||||
strscpy(cap->driver, dev->driver->name, sizeof(cap->driver));
|
||||
strscpy(cap->card, dev->driver->name, sizeof(cap->card));
|
||||
snprintf(cap->bus_info, sizeof(cap->bus_info),
|
||||
"platform:%s", dev_name(dev));
|
||||
cap->device_caps = caps;
|
||||
|
|
|
@ -1087,7 +1087,7 @@ static int fimc_cap_enum_input(struct file *file, void *priv,
|
|||
fimc_md_graph_unlock(ve);
|
||||
|
||||
if (sd)
|
||||
strlcpy(i->name, sd->name, sizeof(i->name));
|
||||
strscpy(i->name, sd->name, sizeof(i->name));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ static int fimc_is_i2c_probe(struct platform_device *pdev)
|
|||
i2c_adap = &isp_i2c->adapter;
|
||||
i2c_adap->dev.of_node = node;
|
||||
i2c_adap->dev.parent = &pdev->dev;
|
||||
strlcpy(i2c_adap->name, "exynos4x12-isp-i2c", sizeof(i2c_adap->name));
|
||||
strscpy(i2c_adap->name, "exynos4x12-isp-i2c", sizeof(i2c_adap->name));
|
||||
i2c_adap->owner = THIS_MODULE;
|
||||
i2c_adap->algo = &fimc_is_i2c_algorithm;
|
||||
i2c_adap->class = I2C_CLASS_SPD;
|
||||
|
|
|
@ -365,7 +365,7 @@ static int isp_video_enum_fmt_mplane(struct file *file, void *priv,
|
|||
if (WARN_ON(fmt == NULL))
|
||||
return -EINVAL;
|
||||
|
||||
strlcpy(f->description, fmt->name, sizeof(f->description));
|
||||
strscpy(f->description, fmt->name, sizeof(f->description));
|
||||
f->pixelformat = fmt->fourcc;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -654,8 +654,8 @@ static int fimc_lite_querycap(struct file *file, void *priv,
|
|||
{
|
||||
struct fimc_lite *fimc = video_drvdata(file);
|
||||
|
||||
strlcpy(cap->driver, FIMC_LITE_DRV_NAME, sizeof(cap->driver));
|
||||
strlcpy(cap->card, FIMC_LITE_DRV_NAME, sizeof(cap->card));
|
||||
strscpy(cap->driver, FIMC_LITE_DRV_NAME, sizeof(cap->driver));
|
||||
strscpy(cap->card, FIMC_LITE_DRV_NAME, sizeof(cap->card));
|
||||
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
|
||||
dev_name(&fimc->pdev->dev));
|
||||
|
||||
|
@ -673,7 +673,7 @@ static int fimc_lite_enum_fmt_mplane(struct file *file, void *priv,
|
|||
return -EINVAL;
|
||||
|
||||
fmt = &fimc_lite_formats[f->index];
|
||||
strlcpy(f->description, fmt->name, sizeof(f->description));
|
||||
strscpy(f->description, fmt->name, sizeof(f->description));
|
||||
f->pixelformat = fmt->fourcc;
|
||||
|
||||
return 0;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue