Skip to content

Commit 22069fb

Browse files
committed
media: uvcvideo: Announce the user our deprecation intentions
jira LE-3622 Rebuild_History Non-Buildable kernel-6.12.0-55.22.1.el10_0 commit-author Ricardo Ribalda <ribalda@chromium.org> commit 40ed9e9 If the user sets the nodrop parameter, print a deprecation warning once. Hopefully they will come to the mailing list if it is an ABI change. Now that we have a callback, take this chance to parse the parameter as a boolean. We still say to userspace that it is a uint to avoid ABI changes. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241218-uvc-deprecate-v2-4-ab814139e983@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> (cherry picked from commit 40ed9e9) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 8fc6f3a commit 22069fb

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

drivers/media/usb/uvc/uvc_driver.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2387,8 +2387,25 @@ module_param_call(clock, uvc_clock_param_set, uvc_clock_param_get,
23872387
MODULE_PARM_DESC(clock, "Video buffers timestamp clock");
23882388
module_param_named(hwtimestamps, uvc_hw_timestamps_param, uint, 0644);
23892389
MODULE_PARM_DESC(hwtimestamps, "Use hardware timestamps");
2390-
module_param_named(nodrop, uvc_no_drop_param, uint, 0644);
2390+
2391+
static int param_set_nodrop(const char *val, const struct kernel_param *kp)
2392+
{
2393+
pr_warn_once("uvcvideo: "
2394+
DEPRECATED
2395+
"nodrop parameter will be eventually removed.\n");
2396+
return param_set_bool(val, kp);
2397+
}
2398+
2399+
static const struct kernel_param_ops param_ops_nodrop = {
2400+
.set = param_set_nodrop,
2401+
.get = param_get_uint,
2402+
};
2403+
2404+
param_check_uint(nodrop, &uvc_no_drop_param);
2405+
module_param_cb(nodrop, &param_ops_nodrop, &uvc_no_drop_param, 0644);
2406+
__MODULE_PARM_TYPE(nodrop, "uint");
23912407
MODULE_PARM_DESC(nodrop, "Don't drop incomplete frames");
2408+
23922409
module_param_named(quirks, uvc_quirks_param, uint, 0644);
23932410
MODULE_PARM_DESC(quirks, "Forced device quirks");
23942411
module_param_named(trace, uvc_dbg_param, uint, 0644);

0 commit comments

Comments
 (0)