Lines Matching refs:hw
16 struct hw {
24 static void hw_finished ( struct hw *hw, int rc ) {
25 intf_shutdown ( &hw->xfer, rc );
26 process_del ( &hw->process );
29 static void hw_step ( struct hw *hw ) {
32 if ( xfer_window ( &hw->xfer ) ) {
33 rc = xfer_deliver_raw ( &hw->xfer, hw_msg, sizeof ( hw_msg ) );
34 hw_finished ( hw, rc );
39 INTF_OP ( xfer_window_changed, struct hw *, hw_step ),
40 INTF_OP ( intf_close, struct hw *, hw_finished ),
44 INTF_DESC ( struct hw, xfer, hw_xfer_operations );
47 PROC_DESC_ONCE ( struct hw, process, hw_step );
50 struct hw *hw;
53 hw = zalloc ( sizeof ( *hw ) );
54 if ( ! hw )
56 ref_init ( &hw->refcnt, NULL );
57 intf_init ( &hw->xfer, &hw_xfer_desc, &hw->refcnt );
58 process_init ( &hw->process, &hw_process_desc, &hw->refcnt );
61 intf_plug_plug ( &hw->xfer, xfer );
62 ref_put ( &hw->refcnt );
67 .scheme = "hw",