These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / mips / bcm47xx / buttons.c
index 276276a..52caa75 100644 (file)
@@ -299,6 +299,13 @@ bcm47xx_buttons_linksys_wrtsl54gs[] __initconst = {
        BCM47XX_GPIO_KEY(6, KEY_RESTART),
 };
 
+/* Luxul */
+
+static const struct gpio_keys_button
+bcm47xx_buttons_luxul_xwr_1750_v1[] = {
+       BCM47XX_GPIO_KEY(14, BTN_TASK),
+};
+
 /* Microsoft */
 
 static const struct gpio_keys_button
@@ -389,10 +396,9 @@ static int __init bcm47xx_buttons_copy(const struct gpio_keys_button *buttons,
 {
        size_t size = nbuttons * sizeof(*buttons);
 
-       bcm47xx_button_pdata.buttons = kmalloc(size, GFP_KERNEL);
+       bcm47xx_button_pdata.buttons = kmemdup(buttons, size, GFP_KERNEL);
        if (!bcm47xx_button_pdata.buttons)
                return -ENOMEM;
-       memcpy(bcm47xx_button_pdata.buttons, buttons, size);
        bcm47xx_button_pdata.nbuttons = nbuttons;
 
        return 0;
@@ -555,6 +561,10 @@ int __init bcm47xx_buttons_register(void)
                err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs);
                break;
 
+       case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
+               err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_1750_v1);
+               break;
+
        case BCM47XX_BOARD_MICROSOFT_MN700:
                err = bcm47xx_copy_bdata(bcm47xx_buttons_microsoft_nm700);
                break;