File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,23 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)
126126 "gpio-ir-recv-irq" , gpio_dev );
127127}
128128
129+ static int gpio_ir_recv_remove (struct platform_device * pdev )
130+ {
131+ struct gpio_rc_dev * gpio_dev = platform_get_drvdata (pdev );
132+ struct device * pmdev = gpio_dev -> pmdev ;
133+
134+ if (pmdev ) {
135+ pm_runtime_get_sync (pmdev );
136+ cpu_latency_qos_remove_request (& gpio_dev -> qos );
137+
138+ pm_runtime_disable (pmdev );
139+ pm_runtime_put_noidle (pmdev );
140+ pm_runtime_set_suspended (pmdev );
141+ }
142+
143+ return 0 ;
144+ }
145+
129146#ifdef CONFIG_PM
130147static int gpio_ir_recv_suspend (struct device * dev )
131148{
@@ -185,6 +202,7 @@ MODULE_DEVICE_TABLE(of, gpio_ir_recv_of_match);
185202
186203static struct platform_driver gpio_ir_recv_driver = {
187204 .probe = gpio_ir_recv_probe ,
205+ .remove = gpio_ir_recv_remove ,
188206 .driver = {
189207 .name = KBUILD_MODNAME ,
190208 .of_match_table = of_match_ptr (gpio_ir_recv_of_match ),
You can’t perform that action at this time.
0 commit comments