Input: i8042 - make sure Dritek quirk is invoked at resume

Also do not fail i8042 entire initialization if enabling dritek extension
fails.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by Bruno Prémont and committed by Dmitry Torokhov d35895db 65e660aa

+25 -8
+25 -8
drivers/input/serio/i8042.c
··· 885 885 886 886 #undef DELAY 887 887 888 + #ifdef CONFIG_X86 889 + static void i8042_dritek_enable(void) 890 + { 891 + char param = 0x90; 892 + int error; 893 + 894 + error = i8042_command(&param, 0x1059); 895 + if (error) 896 + printk(KERN_WARNING 897 + "Failed to enable DRITEK extension: %d\n", 898 + error); 899 + } 900 + #endif 901 + 888 902 #ifdef CONFIG_PM 889 903 /* 890 904 * Here we try to restore the original BIOS settings. We only want to ··· 955 941 printk(KERN_ERR "i8042: Can't write CTR to resume\n"); 956 942 return -EIO; 957 943 } 944 + 945 + 946 + #ifdef CONFIG_X86 947 + if (i8042_dritek) 948 + i8042_dritek_enable(); 949 + #endif 958 950 959 951 if (i8042_mux_present) { 960 952 if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports()) ··· 1180 1160 if (error) 1181 1161 return error; 1182 1162 1163 + #ifdef CONFIG_X86 1164 + if (i8042_dritek) 1165 + i8042_dritek_enable(); 1166 + #endif 1167 + 1183 1168 if (!i8042_noaux) { 1184 1169 error = i8042_setup_aux(); 1185 1170 if (error && error != -ENODEV && error != -EBUSY) ··· 1196 1171 if (error) 1197 1172 goto out_fail; 1198 1173 } 1199 - #ifdef CONFIG_X86 1200 - if (i8042_dritek) { 1201 - char param = 0x90; 1202 - error = i8042_command(&param, 0x1059); 1203 - if (error) 1204 - goto out_fail; 1205 - } 1206 - #endif 1207 1174 /* 1208 1175 * Ok, everything is ready, let's register all serio ports 1209 1176 */