Lines Matching refs:handle
31 static void apmpower_event(struct input_handle *handle, unsigned int type, in apmpower_event() argument
52 struct input_handle *handle; in apmpower_connect() local
55 handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL); in apmpower_connect()
56 if (!handle) in apmpower_connect()
59 handle->dev = dev; in apmpower_connect()
60 handle->handler = handler; in apmpower_connect()
61 handle->name = "apm-power"; in apmpower_connect()
63 error = input_register_handle(handle); in apmpower_connect()
67 kfree(handle); in apmpower_connect()
71 error = input_open_device(handle); in apmpower_connect()
74 input_unregister_handle(handle); in apmpower_connect()
75 kfree(handle); in apmpower_connect()
82 static void apmpower_disconnect(struct input_handle *handle) in apmpower_disconnect() argument
84 input_close_device(handle); in apmpower_disconnect()
85 input_unregister_handle(handle); in apmpower_disconnect()
86 kfree(handle); in apmpower_disconnect()