Skip to content

Commit 54832bd

Browse files
SytheZNpastaq
authored andcommitted
feat: implement ayaneo_platform_remove and ayaneo_platform_shutdown
1 parent 2e1c1e5 commit 54832bd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ayaneo-platform.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,13 +1018,27 @@ static int ayaneo_platform_probe(struct platform_device *pdev)
10181018
return ret;
10191019
}
10201020

1021+
static void ayaneo_platform_shutdown(struct platform_device *pdev)
1022+
{
1023+
kthread_stop(ayaneo_led_mc_writer_thread);
1024+
ayaneo_led_mc_release_control();
1025+
}
1026+
1027+
static void ayaneo_platform_remove(struct platform_device *pdev)
1028+
{
1029+
kthread_stop(ayaneo_led_mc_writer_thread);
1030+
ayaneo_led_mc_release_control();
1031+
}
1032+
10211033
static struct platform_driver ayaneo_platform_driver = {
10221034
.driver = {
10231035
.name = "ayaneo-platform",
10241036
},
10251037
.probe = ayaneo_platform_probe,
10261038
.resume = ayaneo_platform_resume,
10271039
.suspend = ayaneo_platform_suspend,
1040+
.shutdown = ayaneo_platform_shutdown,
1041+
.remove_new = ayaneo_platform_remove,
10281042
};
10291043

10301044
static struct platform_device *ayaneo_platform_device;

0 commit comments

Comments
 (0)