Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'platform-drivers-x86-v4.10-3' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86

Pull x86 platform driver fixes from Darren Hart:
"Just two small fixes for platform drivers x86:

- use brightness_set_blocking for LED-setting callbacks on Fujitsu
laptops

- fix surface3_button build errors"

* tag 'platform-drivers-x86-v4.10-3' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
platform/x86: fujitsu-laptop: use brightness_set_blocking for LED-setting callbacks
platform/x86: fix surface3_button build errors

+22 -22
+1 -1
drivers/platform/x86/Kconfig
··· 1034 1034 1035 1035 config SURFACE_3_BUTTON 1036 1036 tristate "Power/home/volume buttons driver for Microsoft Surface 3 tablet" 1037 - depends on ACPI && KEYBOARD_GPIO 1037 + depends on ACPI && KEYBOARD_GPIO && I2C 1038 1038 ---help--- 1039 1039 This driver handles the power/home/volume buttons on the Microsoft Surface 3 tablet. 1040 1040
+21 -21
drivers/platform/x86/fujitsu-laptop.c
··· 177 177 178 178 #if IS_ENABLED(CONFIG_LEDS_CLASS) 179 179 static enum led_brightness logolamp_get(struct led_classdev *cdev); 180 - static void logolamp_set(struct led_classdev *cdev, 180 + static int logolamp_set(struct led_classdev *cdev, 181 181 enum led_brightness brightness); 182 182 183 183 static struct led_classdev logolamp_led = { 184 184 .name = "fujitsu::logolamp", 185 185 .brightness_get = logolamp_get, 186 - .brightness_set = logolamp_set 186 + .brightness_set_blocking = logolamp_set 187 187 }; 188 188 189 189 static enum led_brightness kblamps_get(struct led_classdev *cdev); 190 - static void kblamps_set(struct led_classdev *cdev, 190 + static int kblamps_set(struct led_classdev *cdev, 191 191 enum led_brightness brightness); 192 192 193 193 static struct led_classdev kblamps_led = { 194 194 .name = "fujitsu::kblamps", 195 195 .brightness_get = kblamps_get, 196 - .brightness_set = kblamps_set 196 + .brightness_set_blocking = kblamps_set 197 197 }; 198 198 199 199 static enum led_brightness radio_led_get(struct led_classdev *cdev); 200 - static void radio_led_set(struct led_classdev *cdev, 200 + static int radio_led_set(struct led_classdev *cdev, 201 201 enum led_brightness brightness); 202 202 203 203 static struct led_classdev radio_led = { 204 204 .name = "fujitsu::radio_led", 205 205 .brightness_get = radio_led_get, 206 - .brightness_set = radio_led_set 206 + .brightness_set_blocking = radio_led_set 207 207 }; 208 208 209 209 static enum led_brightness eco_led_get(struct led_classdev *cdev); 210 - static void eco_led_set(struct led_classdev *cdev, 210 + static int eco_led_set(struct led_classdev *cdev, 211 211 enum led_brightness brightness); 212 212 213 213 static struct led_classdev eco_led = { 214 214 .name = "fujitsu::eco_led", 215 215 .brightness_get = eco_led_get, 216 - .brightness_set = eco_led_set 216 + .brightness_set_blocking = eco_led_set 217 217 }; 218 218 #endif 219 219 ··· 267 267 #if IS_ENABLED(CONFIG_LEDS_CLASS) 268 268 /* LED class callbacks */ 269 269 270 - static void logolamp_set(struct led_classdev *cdev, 270 + static int logolamp_set(struct led_classdev *cdev, 271 271 enum led_brightness brightness) 272 272 { 273 273 if (brightness >= LED_FULL) { 274 274 call_fext_func(FUNC_LEDS, 0x1, LOGOLAMP_POWERON, FUNC_LED_ON); 275 - call_fext_func(FUNC_LEDS, 0x1, LOGOLAMP_ALWAYS, FUNC_LED_ON); 275 + return call_fext_func(FUNC_LEDS, 0x1, LOGOLAMP_ALWAYS, FUNC_LED_ON); 276 276 } else if (brightness >= LED_HALF) { 277 277 call_fext_func(FUNC_LEDS, 0x1, LOGOLAMP_POWERON, FUNC_LED_ON); 278 - call_fext_func(FUNC_LEDS, 0x1, LOGOLAMP_ALWAYS, FUNC_LED_OFF); 278 + return call_fext_func(FUNC_LEDS, 0x1, LOGOLAMP_ALWAYS, FUNC_LED_OFF); 279 279 } else { 280 - call_fext_func(FUNC_LEDS, 0x1, LOGOLAMP_POWERON, FUNC_LED_OFF); 280 + return call_fext_func(FUNC_LEDS, 0x1, LOGOLAMP_POWERON, FUNC_LED_OFF); 281 281 } 282 282 } 283 283 284 - static void kblamps_set(struct led_classdev *cdev, 284 + static int kblamps_set(struct led_classdev *cdev, 285 285 enum led_brightness brightness) 286 286 { 287 287 if (brightness >= LED_FULL) 288 - call_fext_func(FUNC_LEDS, 0x1, KEYBOARD_LAMPS, FUNC_LED_ON); 288 + return call_fext_func(FUNC_LEDS, 0x1, KEYBOARD_LAMPS, FUNC_LED_ON); 289 289 else 290 - call_fext_func(FUNC_LEDS, 0x1, KEYBOARD_LAMPS, FUNC_LED_OFF); 290 + return call_fext_func(FUNC_LEDS, 0x1, KEYBOARD_LAMPS, FUNC_LED_OFF); 291 291 } 292 292 293 - static void radio_led_set(struct led_classdev *cdev, 293 + static int radio_led_set(struct led_classdev *cdev, 294 294 enum led_brightness brightness) 295 295 { 296 296 if (brightness >= LED_FULL) 297 - call_fext_func(FUNC_RFKILL, 0x5, RADIO_LED_ON, RADIO_LED_ON); 297 + return call_fext_func(FUNC_RFKILL, 0x5, RADIO_LED_ON, RADIO_LED_ON); 298 298 else 299 - call_fext_func(FUNC_RFKILL, 0x5, RADIO_LED_ON, 0x0); 299 + return call_fext_func(FUNC_RFKILL, 0x5, RADIO_LED_ON, 0x0); 300 300 } 301 301 302 - static void eco_led_set(struct led_classdev *cdev, 302 + static int eco_led_set(struct led_classdev *cdev, 303 303 enum led_brightness brightness) 304 304 { 305 305 int curr; 306 306 307 307 curr = call_fext_func(FUNC_LEDS, 0x2, ECO_LED, 0x0); 308 308 if (brightness >= LED_FULL) 309 - call_fext_func(FUNC_LEDS, 0x1, ECO_LED, curr | ECO_LED_ON); 309 + return call_fext_func(FUNC_LEDS, 0x1, ECO_LED, curr | ECO_LED_ON); 310 310 else 311 - call_fext_func(FUNC_LEDS, 0x1, ECO_LED, curr & ~ECO_LED_ON); 311 + return call_fext_func(FUNC_LEDS, 0x1, ECO_LED, curr & ~ECO_LED_ON); 312 312 } 313 313 314 314 static enum led_brightness logolamp_get(struct led_classdev *cdev)