Commit 1965445e authored by Aditya Garg's avatar Aditya Garg Committed by Jiri Kosina
Browse files

HID: appletb-kbd: add .resume method in PM



Upon resuming from suspend, the Touch Bar driver was missing a resume
method in order to restore the original mode the Touch Bar was on before
suspending. It is the same as the reset_resume method.

[jkosina@suse.com: rebased on top of the pm_ptr() conversion]
Cc: stable@vger.kernel.org
Signed-off-by: default avatarAditya Garg <gargaditya08@live.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent 70031e70
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -476,7 +476,7 @@ static int appletb_kbd_suspend(struct hid_device *hdev, pm_message_t msg)
	return 0;
}

static int appletb_kbd_reset_resume(struct hid_device *hdev)
static int appletb_kbd_resume(struct hid_device *hdev)
{
	struct appletb_kbd *kbd = hid_get_drvdata(hdev);

@@ -500,7 +500,8 @@ static struct hid_driver appletb_kbd_hid_driver = {
	.event = appletb_kbd_hid_event,
	.input_configured = appletb_kbd_input_configured,
	.suspend = pm_ptr(appletb_kbd_suspend),
	.reset_resume = pm_ptr(appletb_kbd_reset_resume),
	.resume = pm_ptr(appletb_kbd_resume),
	.reset_resume = pm_ptr(appletb_kbd_resume),
	.driver.dev_groups = appletb_kbd_groups,
};
module_hid_driver(appletb_kbd_hid_driver);