]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/touchscreen/corgi_ts.c
Input: add MODULE_ALIAS() to hotpluggable platform modules
[linux-2.6-omap-h63xx.git] / drivers / input / touchscreen / corgi_ts.c
index e2945582828e2436c0094e438828d58672523c4f..765e964b796967bc53cdf756e823ff54ac236ee8 100644 (file)
@@ -74,10 +74,10 @@ extern unsigned int get_clk_frequency_khz(int info);
 
 static unsigned long calc_waittime(struct corgi_ts *corgi_ts)
 {
-       unsigned long hsync_len = corgi_ts->machinfo->get_hsync_len();
+       unsigned long hsync_invperiod = corgi_ts->machinfo->get_hsync_invperiod();
 
-       if (hsync_len)
-               return get_clk_frequency_khz(0)*1000/hsync_len;
+       if (hsync_invperiod)
+               return get_clk_frequency_khz(0)*1000/hsync_invperiod;
        else
                return 0;
 }
@@ -114,7 +114,7 @@ static int sync_receive_data_send_cmd(struct corgi_ts *corgi_ts, int doRecive, i
                        if (timer2-timer1 > wait_time) {
                                /* too slow - timeout, try again */
                                corgi_ts->machinfo->wait_hsync();
-                               /* get OSCR */
+                               /* get CCNT */
                                CCNT(timer1);
                                /* Wait after HSync */
                                CCNT(timer2);
@@ -300,11 +300,10 @@ static int __init corgits_probe(struct platform_device *pdev)
        input_dev->id.vendor = 0x0001;
        input_dev->id.product = 0x0002;
        input_dev->id.version = 0x0100;
-       input_dev->cdev.dev = &pdev->dev;
-       input_dev->private = corgi_ts;
+       input_dev->dev.parent = &pdev->dev;
 
-       input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
-       input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);
+       input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
+       input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
        input_set_abs_params(input_dev, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0);
        input_set_abs_params(input_dev, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0);
        input_set_abs_params(input_dev, ABS_PRESSURE, PRESSURE_MIN, PRESSURE_MAX, 0, 0);
@@ -362,6 +361,7 @@ static struct platform_driver corgits_driver = {
        .resume         = corgits_resume,
        .driver         = {
                .name   = "corgi-ts",
+               .owner  = THIS_MODULE,
        },
 };
 
@@ -381,3 +381,4 @@ module_exit(corgits_exit);
 MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>");
 MODULE_DESCRIPTION("Corgi TouchScreen Driver");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:corgi-ts");