]> Pileus Git - ~andy/linux/blobdiff - drivers/media/video/usbvideo/quickcam_messenger.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[~andy/linux] / drivers / media / video / usbvideo / quickcam_messenger.c
index ec0ff2247f06a6c74c8382640b913903e7c96cc7..a2acba0bcc47586163bd4d82dffa91340354251b 100644 (file)
@@ -100,12 +100,10 @@ static void qcm_register_input(struct qcm *cam, struct usb_device *dev)
        input_dev->name = "QCM button";
        input_dev->phys = cam->input_physname;
        usb_to_input_id(dev, &input_dev->id);
-       input_dev->cdev.dev = &dev->dev;
+       input_dev->dev.parent = &dev->dev;
 
-       input_dev->evbit[0] = BIT(EV_KEY);
-       input_dev->keybit[LONG(BTN_0)] = BIT(BTN_0);
-
-       input_dev->private = cam;
+       input_dev->evbit[0] = BIT_MASK(EV_KEY);
+       input_dev->keybit[BIT_WORD(BTN_0)] = BIT_MASK(BTN_0);
 
        error = input_register_device(cam->input);
        if (error) {
@@ -258,7 +256,7 @@ static void qcm_hsv2rgb(u16 hue, u16 sat, u16 val, u16 *r, u16 *g, u16 *b)
        unsigned int p;
 
        /*
-       the registers controling gain are 8 bit of which
+       the registers controlling gain are 8 bit of which
        we affect only the last 4 bits with our gain.
        we know that if saturation is 0, (unsaturated) then
        we're grayscale (center axis of the colour cone) so
@@ -439,7 +437,7 @@ static int qcm_sensor_init(struct uvd *uvd)
        int ret;
        int i;
 
-       for (i=0; i < sizeof(regval_table)/sizeof(regval_table[0]) ; i++) {
+       for (i=0; i < ARRAY_SIZE(regval_table) ; i++) {
                CHECK_RET(ret, qcm_stv_setb(uvd->dev,
                                        regval_table[i].reg,
                                        regval_table[i].val));