Re: [PATCH] Panasonic Let's Note laptop extras driver v0.93

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

 



On Fri, Jul 04, 2008 at 01:35:42AM +0800, Harald Welte wrote:
> +
> +static int pcc_setkeycode(struct input_dev *dev, int scancode, int keycode)
> +{
> +	struct pcc_acpi *pcc = input_get_drvdata(dev);
> +
> +	if (scancode > ARRAY_SIZE(pcc->keymap))
> +		return -EINVAL;
> +
> +	if (keycode < 0 || keycode > KEY_MAX)
> +		return -EINVAL;
> +
> +	pcc->keymap[scancode] = keycode;

You probably want to set_bit the input device here, and also clean up 
any now-unused keycodes from there. I'd also suggest sending KEY_PROG1 
by default on the CPU throttle button - some users will find it easier 
if it already generates a keycode. Other than that, looks good.

-- 
Matthew Garrett | mjg59@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux