Re: drivers/platform/x86/sony-laptop.c: fix scancodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux