v4l: rcar-fcp: Don't force users to check for disabled FCP support
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 17 Aug 2016 12:57:37 +0000 (09:57 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Oct 2016 08:03:30 +0000 (10:03 +0200)
commitccb3dd25005d999605637f0203ce67be9373eac2
treec51c32ebeaaa026d6bcfbe1f462d444964517e71
parentcb5d016a9dd33c3131efff555d43095caf51f69e
v4l: rcar-fcp: Don't force users to check for disabled FCP support

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 <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/media/rcar-fcp.h
This page took 0.024511 seconds and 5 git commands to generate.