hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/media/platform/omap3isp/isppreview.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * isppreview.c
34 *
....@@ -8,10 +9,6 @@
89 *
910 * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
1011 * Sakari Ailus <sakari.ailus@iki.fi>
11
- *
12
- * This program is free software; you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License version 2 as
14
- * published by the Free Software Foundation.
1512 */
1613
1714 #include <linux/device.h>
....@@ -756,7 +753,7 @@
756753 preview_config_luma_enhancement,
757754 preview_enable_luma_enhancement,
758755 offsetof(struct prev_params, luma),
759
- FIELD_SIZEOF(struct prev_params, luma),
756
+ sizeof_field(struct prev_params, luma),
760757 offsetof(struct omap3isp_prev_update_config, luma),
761758 }, /* OMAP3ISP_PREV_INVALAW */ {
762759 NULL,
....@@ -765,55 +762,55 @@
765762 preview_config_hmed,
766763 preview_enable_hmed,
767764 offsetof(struct prev_params, hmed),
768
- FIELD_SIZEOF(struct prev_params, hmed),
765
+ sizeof_field(struct prev_params, hmed),
769766 offsetof(struct omap3isp_prev_update_config, hmed),
770767 }, /* OMAP3ISP_PREV_CFA */ {
771768 preview_config_cfa,
772769 NULL,
773770 offsetof(struct prev_params, cfa),
774
- FIELD_SIZEOF(struct prev_params, cfa),
771
+ sizeof_field(struct prev_params, cfa),
775772 offsetof(struct omap3isp_prev_update_config, cfa),
776773 }, /* OMAP3ISP_PREV_CHROMA_SUPP */ {
777774 preview_config_chroma_suppression,
778775 preview_enable_chroma_suppression,
779776 offsetof(struct prev_params, csup),
780
- FIELD_SIZEOF(struct prev_params, csup),
777
+ sizeof_field(struct prev_params, csup),
781778 offsetof(struct omap3isp_prev_update_config, csup),
782779 }, /* OMAP3ISP_PREV_WB */ {
783780 preview_config_whitebalance,
784781 NULL,
785782 offsetof(struct prev_params, wbal),
786
- FIELD_SIZEOF(struct prev_params, wbal),
783
+ sizeof_field(struct prev_params, wbal),
787784 offsetof(struct omap3isp_prev_update_config, wbal),
788785 }, /* OMAP3ISP_PREV_BLKADJ */ {
789786 preview_config_blkadj,
790787 NULL,
791788 offsetof(struct prev_params, blkadj),
792
- FIELD_SIZEOF(struct prev_params, blkadj),
789
+ sizeof_field(struct prev_params, blkadj),
793790 offsetof(struct omap3isp_prev_update_config, blkadj),
794791 }, /* OMAP3ISP_PREV_RGB2RGB */ {
795792 preview_config_rgb_blending,
796793 NULL,
797794 offsetof(struct prev_params, rgb2rgb),
798
- FIELD_SIZEOF(struct prev_params, rgb2rgb),
795
+ sizeof_field(struct prev_params, rgb2rgb),
799796 offsetof(struct omap3isp_prev_update_config, rgb2rgb),
800797 }, /* OMAP3ISP_PREV_COLOR_CONV */ {
801798 preview_config_csc,
802799 NULL,
803800 offsetof(struct prev_params, csc),
804
- FIELD_SIZEOF(struct prev_params, csc),
801
+ sizeof_field(struct prev_params, csc),
805802 offsetof(struct omap3isp_prev_update_config, csc),
806803 }, /* OMAP3ISP_PREV_YC_LIMIT */ {
807804 preview_config_yc_range,
808805 NULL,
809806 offsetof(struct prev_params, yclimit),
810
- FIELD_SIZEOF(struct prev_params, yclimit),
807
+ sizeof_field(struct prev_params, yclimit),
811808 offsetof(struct omap3isp_prev_update_config, yclimit),
812809 }, /* OMAP3ISP_PREV_DEFECT_COR */ {
813810 preview_config_dcor,
814811 preview_enable_dcor,
815812 offsetof(struct prev_params, dcor),
816
- FIELD_SIZEOF(struct prev_params, dcor),
813
+ sizeof_field(struct prev_params, dcor),
817814 offsetof(struct omap3isp_prev_update_config, dcor),
818815 }, /* Previously OMAP3ISP_PREV_GAMMABYPASS, not used anymore */ {
819816 NULL,
....@@ -831,13 +828,13 @@
831828 preview_config_noisefilter,
832829 preview_enable_noisefilter,
833830 offsetof(struct prev_params, nf),
834
- FIELD_SIZEOF(struct prev_params, nf),
831
+ sizeof_field(struct prev_params, nf),
835832 offsetof(struct omap3isp_prev_update_config, nf),
836833 }, /* OMAP3ISP_PREV_GAMMA */ {
837834 preview_config_gammacorrn,
838835 preview_enable_gammacorrn,
839836 offsetof(struct prev_params, gamma),
840
- FIELD_SIZEOF(struct prev_params, gamma),
837
+ sizeof_field(struct prev_params, gamma),
841838 offsetof(struct omap3isp_prev_update_config, gamma),
842839 }, /* OMAP3ISP_PREV_CONTRAST */ {
843840 preview_config_contrast,
....@@ -2268,7 +2265,7 @@
22682265
22692266 v4l2_subdev_init(sd, &preview_v4l2_ops);
22702267 sd->internal_ops = &preview_v4l2_internal_ops;
2271
- strlcpy(sd->name, "OMAP3 ISP preview", sizeof(sd->name));
2268
+ strscpy(sd->name, "OMAP3 ISP preview", sizeof(sd->name));
22722269 sd->grp_id = 1 << 16; /* group ID for isp subdevs */
22732270 v4l2_set_subdevdata(sd, prev);
22742271 sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;