• Stelian Pop's avatar
    [PATCH] sonypi: return an error from sonypi_camera_command() if the camera isn't enabled · afc62cbf
    Stelian Pop authored
    The sonypi_camera_command() used to fail without returning an error code if
    the user fergot to enable the camera in the sonypi module (using the
    camera=1 module parameter).  This caused the meye driver to apparently load
    correctly but miserably fail later, when trying to access the camera for
    getting some data out of it.
    
    This patch adds an error code to sonypi_camera_command() and makes the meye
    driver check for it in the PCI probe routine.  If the function fails, a
    message is printed in the kernel logs reminding the user it should better
    RTFM.
    
    The patch also removes some sonypi_camera_command() commands (those
    supposed to return the current camera settings) which are unreliable.  The
    meye driver does not use them anyway.
    Signed-off-by: default avatarStelian Pop <stelian@popies.net>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    afc62cbf
sonypi.h 13.1 KB