diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-07-15 19:42:32 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-07-15 19:42:32 +0300 |
commit | ecb41832bd2a7a3f8ac93527cec5e51e3827daed (patch) | |
tree | a382a3719eca9ac8a22ae7f1715d0bd4843dc8e2 /drivers/media/usb/go7007/go7007-usb.c | |
parent | d38b6cf50a6b911ee46683330f3af17fcceca509 (diff) | |
parent | 0ecfebd2b52404ae0c54a878c872bb93363ada36 (diff) | |
download | linux-ecb41832bd2a7a3f8ac93527cec5e51e3827daed.tar.xz |
Merge tag 'v5.2' into next
Sync up with mainline to resolve conflicts in iforce driver.
Diffstat (limited to 'drivers/media/usb/go7007/go7007-usb.c')
-rw-r--r-- | drivers/media/usb/go7007/go7007-usb.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/media/usb/go7007/go7007-usb.c b/drivers/media/usb/go7007/go7007-usb.c index 19c6a0354ce0..ff2aa057c1fb 100644 --- a/drivers/media/usb/go7007/go7007-usb.c +++ b/drivers/media/usb/go7007/go7007-usb.c @@ -1,14 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2005-2006 Micronas USA Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License (Version 2) as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -1132,7 +1124,7 @@ static int go7007_usb_probe(struct usb_interface *intf, usb->usbdev = usbdev; usb_make_path(usbdev, go->bus_info, sizeof(go->bus_info)); go->board_id = id->driver_info; - strncpy(go->name, name, sizeof(go->name)); + strscpy(go->name, name, sizeof(go->name)); if (board->flags & GO7007_USB_EZUSB) go->hpi_ops = &go7007_usb_ezusb_hpi_ops; else @@ -1198,7 +1190,7 @@ static int go7007_usb_probe(struct usb_interface *intf, go->board_id = GO7007_BOARDID_ENDURA; usb->board = board = &board_endura; go->board_info = &board->main_info; - strncpy(go->name, "Pelco Endura", + strscpy(go->name, "Pelco Endura", sizeof(go->name)); } else { u16 channel; @@ -1232,21 +1224,21 @@ static int go7007_usb_probe(struct usb_interface *intf, case 1: go->tuner_type = TUNER_SONY_BTF_PG472Z; go->std = V4L2_STD_PAL; - strncpy(go->name, "Plextor PX-TV402U-EU", - sizeof(go->name)); + strscpy(go->name, "Plextor PX-TV402U-EU", + sizeof(go->name)); break; case 2: go->tuner_type = TUNER_SONY_BTF_PK467Z; go->std = V4L2_STD_NTSC_M_JP; num_i2c_devs -= 2; - strncpy(go->name, "Plextor PX-TV402U-JP", - sizeof(go->name)); + strscpy(go->name, "Plextor PX-TV402U-JP", + sizeof(go->name)); break; case 3: go->tuner_type = TUNER_SONY_BTF_PB463Z; num_i2c_devs -= 2; - strncpy(go->name, "Plextor PX-TV402U-NA", - sizeof(go->name)); + strscpy(go->name, "Plextor PX-TV402U-NA", + sizeof(go->name)); break; default: pr_debug("unable to detect tuner type!\n"); |