media: v4l: move helper functions for fractions from uvc to v4l2-common
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Fri, 9 Sep 2022 22:13:32 +0000 (00:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Sep 2022 13:52:30 +0000 (15:52 +0200)
commit6ba8b8d45335180523df8f1b6cd1c995a3dbf560
treecc1bb48adb9e162d1d6f65b43a728c91bc48271e
parentd225ea95e9f9be04914f51aaabab7ed04097cd4e
media: v4l: move helper functions for fractions from uvc to v4l2-common

The functions uvc_simplify_fraction and uvc_fraction_to_interval are
generic helpers which are also useful for other v4l2 drivers. This patch
moves them to v4l2-common.

Tested-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20220909221335.15033-2-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/uvc/uvc_driver.c
drivers/media/usb/uvc/uvc_v4l2.c
drivers/media/usb/uvc/uvcvideo.h
drivers/media/v4l2-core/v4l2-common.c
include/media/v4l2-common.h