media: mxc-jpeg: jpeg: Replace stracpy with strscpy
The stracpy function exists in next-20190809 but not in v5.4. Replace with strscpy to fix the build The stracpy function was apparently rejected by Linus: https://lkml.org/lkml/2019/8/20/1286 Fixes: fa00960c5659 ("mxc-jpeg: Add v4l2 driver for i.MX8 CAST IP JPEG Encoder/Decoder") Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
f00097b0a3
commit
f74491652d
|
@ -312,7 +312,7 @@ static int enum_fmt(struct mxc_jpeg_fmt *mxc_formats, int n,
|
|||
if (i >= n)
|
||||
return -EINVAL;
|
||||
|
||||
stracpy(f->description, mxc_formats[i].name);
|
||||
strscpy(f->description, mxc_formats[i].name, sizeof(f->description));
|
||||
f->pixelformat = mxc_formats[i].fourcc;
|
||||
|
||||
return 0;
|
||||
|
@ -1596,8 +1596,8 @@ static int mxc_jpeg_querycap(struct file *file, void *priv,
|
|||
{
|
||||
struct mxc_jpeg_dev *mxc_jpeg = video_drvdata(file);
|
||||
|
||||
stracpy(cap->driver, MXC_JPEG_NAME " decoder");
|
||||
stracpy(cap->card, MXC_JPEG_NAME " decoder");
|
||||
strscpy(cap->driver, MXC_JPEG_NAME " decoder", sizeof(cap->driver));
|
||||
strscpy(cap->card, MXC_JPEG_NAME " decoder", sizeof(cap->card));
|
||||
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
|
||||
dev_name(mxc_jpeg->dev));
|
||||
cap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M_MPLANE;
|
||||
|
|
Loading…
Reference in New Issue