hwmon: (sch56xx-common) Use strscpy
authorArmin Wolf <W_Armin@gmx.de>
Sat, 8 May 2021 13:14:55 +0000 (15:14 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 17 Jun 2021 11:21:44 +0000 (04:21 -0700)
strlcpy is considered deprecated.
Replace it with strscpy.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20210508131457.12780-3-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/sch56xx-common.c

index b469d16ec17595127af4e9ba1118e57eea5f0a0d..da915ca2b3b53389e6dfa1e39744c22a145f43e4 100644 (file)
@@ -408,8 +408,7 @@ void sch56xx_watchdog_register(struct device *parent, u16 addr, u32 revision,
        data->addr = addr;
        data->io_lock = io_lock;
 
-       strlcpy(data->wdinfo.identity, "sch56xx watchdog",
-               sizeof(data->wdinfo.identity));
+       strscpy(data->wdinfo.identity, "sch56xx watchdog", sizeof(data->wdinfo.identity));
        data->wdinfo.firmware_version = revision;
        data->wdinfo.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT;
        if (!nowayout)