V4L/DVB (7813): Fix compilation, when V4L1_COMPAT is disabled
[firefly-linux-kernel-4.4.55.git] / drivers / media / video / stk-webcam.c
index ceba45ad02942622edd1c67f8aecb9d65306c1e7..b12c60cf5a0985749df66008e1b6f10a558ee28f 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/kref.h>
 
 #include <linux/usb.h>
+#include <linux/mm.h>
 #include <linux/vmalloc.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-common.h>
@@ -245,6 +246,8 @@ static int stk_initialise(struct stk_camera *dev)
                return -1;
 }
 
+#ifdef CONFIG_VIDEO_V4L1_COMPAT
+
 /* sysfs functions */
 /*FIXME cleanup this */
 
@@ -350,6 +353,10 @@ static void stk_remove_sysfs_files(struct video_device *vdev)
        video_device_remove_file(vdev, &dev_attr_vflip);
 }
 
+#else
+#define stk_create_sysfs_files(a)
+#define stk_remove_sysfs_files(a)
+#endif
 
 /* *********************************************** */
 /*
@@ -1100,7 +1107,7 @@ static int stk_setup_format(struct stk_camera *dev)
                        && i < ARRAY_SIZE(stk_sizes))
                i++;
        if (i == ARRAY_SIZE(stk_sizes)) {
-               STK_ERROR("Something is broken in %s\n", __FUNCTION__);
+               STK_ERROR("Something is broken in %s\n", __func__);
                return -EFAULT;
        }
        /* This registers controls some timings, not sure of what. */
@@ -1465,7 +1472,7 @@ static void stk_camera_disconnect(struct usb_interface *interface)
 }
 
 #ifdef CONFIG_PM
-int stk_camera_suspend(struct usb_interface *intf, pm_message_t message)
+static int stk_camera_suspend(struct usb_interface *intf, pm_message_t message)
 {
        struct stk_camera *dev = usb_get_intfdata(intf);
        if (is_streaming(dev)) {
@@ -1476,7 +1483,7 @@ int stk_camera_suspend(struct usb_interface *intf, pm_message_t message)
        return 0;
 }
 
-int stk_camera_resume(struct usb_interface *intf)
+static int stk_camera_resume(struct usb_interface *intf)
 {
        struct stk_camera *dev = usb_get_intfdata(intf);
        if (!is_initialised(dev))