hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/media/i2c/m5mols/m5mols_core.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for M-5MOLS 8M Pixel camera sensor with ISP
34 *
....@@ -6,11 +7,6 @@
67 *
78 * Copyright (C) 2009 Samsung Electronics Co., Ltd.
89 * Author: Dongsoo Nathaniel Kim <dongsoo45.kim@samsung.com>
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License as published by
12
- * the Free Software Foundation; either version 2 of the License, or
13
- * (at your option) any later version.
1410 */
1511
1612 #include <linux/i2c.h>
....@@ -291,7 +287,7 @@
291287 * @reg: the I2C_REG() address of an 8-bit status register to check
292288 * @value: expected status register value
293289 * @mask: bit mask for the read status register value
294
- * @timeout: timeout in miliseconds, or -1 for default timeout
290
+ * @timeout: timeout in milliseconds, or -1 for default timeout
295291 *
296292 * The @reg register value is ORed with @mask before comparing with @value.
297293 *
....@@ -492,7 +488,7 @@
492488 do {
493489 if (code == m5mols_default_ffmt[type].code)
494490 return type;
495
- } while (type++ != SIZE_DEFAULT_FFMT);
491
+ } while (++type != SIZE_DEFAULT_FFMT);
496492
497493 return 0;
498494 }
....@@ -988,7 +984,8 @@
988984
989985 sd = &info->sd;
990986 v4l2_i2c_subdev_init(sd, client, &m5mols_ops);
991
- strlcpy(sd->name, MODULE_NAME, sizeof(sd->name));
987
+ /* Static name; NEVER use in new drivers! */
988
+ strscpy(sd->name, MODULE_NAME, sizeof(sd->name));
992989 sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
993990
994991 sd->internal_ops = &m5mols_subdev_internal_ops;