]> Devoid-pointer.net GitWeb - KLGD_FF_plugin.git/commitdiff
Adapt for changed KLGD API
authorMichal Malý <madcatxster@devoid-pointer.net>
Tue, 11 Aug 2015 22:47:40 +0000 (00:47 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Tue, 11 Aug 2015 22:47:40 +0000 (00:47 +0200)
klgdff.c

index 703993d2ca51e59d5dc7b707bfcdc0180274028a..f6eeae3b5589347519dc81095f0371b63f9fed43 100644 (file)
--- a/klgdff.c
+++ b/klgdff.c
@@ -83,7 +83,7 @@ static int klgdff_set_autocenter(struct klgd_command_stream *s, const u16 _autoc
        autocenter = _autocenter;
 
        memcpy(c->bytes, text, len);
-       c->user = (unsigned long)0xDEADBEEF;
+       c->user.data[0] = 0xDEADBEEF;
        kfree(text);
        return klgd_append_cmd(s, c);
 }
@@ -238,8 +238,8 @@ int klgdff_callback(void *data, const struct klgd_command_stream *s)
        printk(KERN_NOTICE "KLGDTM - EFF...\n");
        for (idx = 0; idx < s->count; idx++) {
                printk(KERN_NOTICE "KLGDFF-TD: EFF %s\n", s->commands[idx]->bytes);
-               if (s->commands[idx]->user)
-                       printk("KLGDFF-TD: User 0x%x\n", (unsigned int)s->commands[idx]->user);
+               if (s->commands[idx]->user.data[0])
+                       printk("KLGDFF-TD: User 0x%X\n", s->commands[idx]->user.data[0]);
        }
 
        /* Simulate default USB polling rate of 125 Hz */