Thread (5 messages) 5 messages, 1 author, 2007-12-03
STALE6752d

[PATCH 3/4] apanel: detach on shutdown

From: Stephen Hemminger <hidden>
Date: 2007-12-03 22:21:08

Need to stop any device polling on shutdown. Without this, the
laptop can sometimes not turn off.

Signed-off-by: Stephen Hemminger <redacted>
--- a/drivers/input/misc/apanel.c	2007-11-20 06:11:34.000000000 -0800
+++ b/drivers/input/misc/apanel.c	2007-11-20 06:14:18.000000000 -0800
@@ -193,12 +193,18 @@ static int apanel_attach_adapter(struct 
 	return i2c_probe(adap, &addr_data, apanel_probe);
 }
 
+static void apanel_shutdown(struct i2c_client *client)
+{
+	apanel_detach_client(client);
+}
+
 static struct i2c_driver apanel_driver = {
 	.driver = {
 		.name = APANEL,
 	},
 	.attach_adapter = &apanel_attach_adapter,
 	.detach_client  = &apanel_detach_client,
+	.shutdown	= &apanel_shutdown,
 };
 
 static struct apanel apanel = {
-- 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help