On 11/30/2011 01:55 PM, Dan Carpenter wrote:
Hi John,

Commit 04840b50f395 "drivers/platform/x86/sony-laptop.c: fix scancodes"
introduces a gcc warning:

drivers/platform/x86/sony-laptop.c:395:14: warning:
        ‘scancode’ may be used uninitialized in this function [-Wuninitialized]

Ok, my code was broken, but so was the original - the jogdial device isn't supposed to send scancodes for it's events:

        jog_dev->name = "Sony Vaio Jogdial";
        jog_dev->id.bustype = BUS_ISA;
        jog_dev->id.vendor = PCI_VENDOR_ID_SONY;
        key_dev->dev.parent =&acpi_device->dev;

        input_set_capability(jog_dev, EV_KEY, BTN_MIDDLE);
        input_set_capability(jog_dev, EV_REL, REL_WHEEL);

Note,  no EV_MSC, MSC_SCAN here.

Whoops, anoher bug! Look there, it's setting key_dev->dev.parent instead of jog_dev.dev_parent!

I'll post a new patch when I've finished testing it.

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" 
in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to