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