From: Greg Kroah-Hartman Date: Tue, 18 Oct 2016 14:43:51 +0000 (+0200) Subject: 4.8-stable patches X-Git-Tag: v4.4.26~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d80270b9098616c4551cb3eda11a48ad97d62680;p=thirdparty%2Fkernel%2Fstable-queue.git 4.8-stable patches added patches: v4l-rcar-fcp-don-t-force-users-to-check-for-disabled-fcp-support.patch --- diff --git a/queue-4.8/series b/queue-4.8/series new file mode 100644 index 00000000000..7d0d372c077 --- /dev/null +++ b/queue-4.8/series @@ -0,0 +1 @@ +v4l-rcar-fcp-don-t-force-users-to-check-for-disabled-fcp-support.patch diff --git a/queue-4.8/v4l-rcar-fcp-don-t-force-users-to-check-for-disabled-fcp-support.patch b/queue-4.8/v4l-rcar-fcp-don-t-force-users-to-check-for-disabled-fcp-support.patch new file mode 100644 index 00000000000..26c05cda317 --- /dev/null +++ b/queue-4.8/v4l-rcar-fcp-don-t-force-users-to-check-for-disabled-fcp-support.patch @@ -0,0 +1,43 @@ +From fd44aa9a254b18176ec3792a18e7de6977030ca8 Mon Sep 17 00:00:00 2001 +From: Laurent Pinchart +Date: Wed, 17 Aug 2016 09:57:37 -0300 +Subject: [media] v4l: rcar-fcp: Don't force users to check for disabled FCP support + +From: Laurent Pinchart + +commit fd44aa9a254b18176ec3792a18e7de6977030ca8 upstream. + +The rcar_fcp_enable() function immediately returns successfully when the +FCP device pointer is NULL to avoid forcing the users to check the FCP +device manually before every call. However, the stub version of the +function used when the FCP driver is disabled returns -ENOSYS +unconditionally, resulting in a different API contract for the two +versions of the function. + +As a user that requires FCP support will fail at probe time when calling +rcar_fcp_get() if the FCP driver is disabled, the stub version of the +rcar_fcp_enable() function will only be called with a NULL FCP device. +We can thus return 0 unconditionally to align the behaviour with the +normal version of the function. + +Reported-by: Sergei Shtylyov +Signed-off-by: Laurent Pinchart +Reviewed-by: Geert Uytterhoeven +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + include/media/rcar-fcp.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/media/rcar-fcp.h ++++ b/include/media/rcar-fcp.h +@@ -29,7 +29,7 @@ static inline struct rcar_fcp_device *rc + static inline void rcar_fcp_put(struct rcar_fcp_device *fcp) { } + static inline int rcar_fcp_enable(struct rcar_fcp_device *fcp) + { +- return -ENOSYS; ++ return 0; + } + static inline void rcar_fcp_disable(struct rcar_fcp_device *fcp) { } + #endif