#include "gspca.h"
 
-#ifdef CONFIG_INPUT
+#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
 #include <linux/input.h>
 #include <linux/usb/input.h>
 #endif
 /*
  * Input and interrupt endpoint handling functions
  */
-#ifdef CONFIG_INPUT
+#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
 static void int_irq(struct urb *urb)
 {
        struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context;
                usb_free_urb(urb);
        }
 }
+#else
+static inline void gspca_input_destroy_urb(struct gspca_dev *gspca_dev)
+{
+}
+
+static inline void gspca_input_create_urb(struct gspca_dev *gspca_dev)
+{
+}
+
+static inline int gspca_input_connect(struct gspca_dev *dev)
+{
+       return 0;
+}
 #endif
 
 /* get the current input frame buffer */
 
        return 0;
 out:
-#ifdef CONFIG_INPUT
+#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
        if (gspca_dev->input_dev)
                input_unregister_device(gspca_dev->input_dev);
 #endif
 void gspca_disconnect(struct usb_interface *intf)
 {
        struct gspca_dev *gspca_dev = usb_get_intfdata(intf);
-#ifdef CONFIG_INPUT
+#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
        struct input_dev *input_dev;
 #endif
 
                wake_up_interruptible(&gspca_dev->wq);
        }
 
-#ifdef CONFIG_INPUT
+#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
        gspca_input_destroy_urb(gspca_dev);
        input_dev = gspca_dev->input_dev;
        if (input_dev) {
 
        cam_reg_op get_register;
 #endif
        cam_ident_op get_chip_ident;
-#ifdef CONFIG_INPUT
+#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
        cam_int_pkt_op int_pkt_scan;
        /* other_input makes the gspca core create gspca_dev->input even when
           int_pkt_scan is NULL, for cams with non interrupt driven buttons */
        struct module *module;          /* subdriver handling the device */
        struct usb_device *dev;
        struct file *capt_file;         /* file doing video capture */
-#ifdef CONFIG_INPUT
+#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
        struct input_dev *input_dev;
        char phys[64];                  /* physical device path */
 #endif
 #define USB_BUF_SZ 64
        __u8 *usb_buf;                          /* buffer for USB exchanges */
        struct urb *urb[MAX_NURBS];
-#ifdef CONFIG_INPUT
+#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
        struct urb *int_urb;
 #endif