Skip to contentSkip to conversation

platform/x86: dell-laptop: fix kbd_get_state's request value

PATCH In review Laszlo Toth 3 participants 3 messages Feb 13, 2018 – Feb 14, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 platform/x86: dell-laptop: fix kbd_get_state's request value

Commit 9862b43624a5 ("platform/x86: dell-laptop: Allocate buffer on heap rather than globally")
broke one request, changed it back to the original value.

Tested on a Dell E6540, backlight came back.

Fixes 9862b43624a5 ("platform/x86: dell-laptop: Allocate buffer on heap rather than globally")

---
Changes in v2:
- split the fix and the function merge part
Changes in v3:
- added fixes tag

 drivers/platform/x86/dell-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell-laptop.c +1 -1
index 2a68f59..a37cff9 100644
@@ -1279,7 +1279,7 @@ static int kbd_get_state(struct kbd_state *state)
 	struct calling_interface_buffer buffer;
 	int ret;
 
-	dell_fill_request(&buffer, 0, 0, 0, 0);
+	dell_fill_request(&buffer, 0x1, 0, 0, 0);
 	ret = dell_send_request(&buffer,
 				CLASS_KBD_BACKLIGHT, SELECT_KBD_BACKLIGHT);
 	if (ret)
Signature · 1 line
2.7.4
Reviewed-by on v3 1/1
#1 lore raw
Quoted 22 lines · On Tuesday 13 February 2018 21:43:43 Laszlo Toth wrote:

Commit 9862b43624a5 ("platform/x86: dell-laptop: Allocate buffer on heap rather than globally")
broke one request, changed it back to the original value.

Tested on a Dell E6540, backlight came back.

Fixes 9862b43624a5 ("platform/x86: dell-laptop: Allocate buffer on heap rather than globally")

---
Changes in v2:
- split the fix and the function merge part
Changes in v3:
- added fixes tag

 drivers/platform/x86/dell-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell-laptop.c +0 -0
index 2a68f59..a37cff9 100644

drivers/platform/x86/dell-laptop.c static int kbd_get_state(struct kbd_state *state) · line 1285

Quoted 8 lines
drivers/platform/x86/dell-laptop.c +1 -1
@@ -1279,7 +1279,7 @@ static int kbd_get_state(struct kbd_state *state)
 	struct calling_interface_buffer buffer;
 	int ret;
 
-	dell_fill_request(&buffer, 0, 0, 0, 0);
+	dell_fill_request(&buffer, 0x1, 0, 0, 0);
 	ret = dell_send_request(&buffer,
 				CLASS_KBD_BACKLIGHT, SELECT_KBD_BACKLIGHT);
 	if (ret)

Looks better!

Signature · 2 lines
Pali Rohár
[email protected]
#2 lore raw
Quoted 7 lines · Pali Rohár
Quoted 6 lines · On Tuesday 13 February 2018 21:43:43 Laszlo Toth wrote:

Commit 9862b43624a5 ("platform/x86: dell-laptop: Allocate buffer on heap rather than globally")
broke one request, changed it back to the original value.

Tested on a Dell E6540, backlight came back.

Pushed to my review and testing queue, thanks!

Quoted 32 lines
Quoted 16 lines
Fixes 9862b43624a5 ("platform/x86: dell-laptop: Allocate buffer on heap rather than globally")

---
Changes in v2:
- split the fix and the function merge part
Changes in v3:
- added fixes tag

 drivers/platform/x86/dell-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell-laptop.c +0 -0
index 2a68f59..a37cff9 100644

drivers/platform/x86/dell-laptop.c static int kbd_get_state(struct kbd_state *state) · line 1285

Quoted 8 lines
drivers/platform/x86/dell-laptop.c +1 -1
@@ -1279,7 +1279,7 @@ static int kbd_get_state(struct kbd_state *state)
      struct calling_interface_buffer buffer;
      int ret;
 
-     dell_fill_request(&buffer, 0, 0, 0, 0);
+     dell_fill_request(&buffer, 0x1, 0, 0, 0);
      ret = dell_send_request(&buffer,
                              CLASS_KBD_BACKLIGHT, SELECT_KBD_BACKLIGHT);
      if (ret)

Looks better!

--
Pali Rohár
[email protected]

Signature · 2 lines
With Best Regards,
Andy Shevchenko