Lines Matching refs:wdata

21 	struct wiimote_data *wdata;  member
30 struct wiimote_data *wdata = dbg->wdata; in wiidebug_eeprom_read() local
43 ret = wiimote_cmd_acquire(wdata); in wiidebug_eeprom_read()
47 spin_lock_irqsave(&wdata->state.lock, flags); in wiidebug_eeprom_read()
48 wdata->state.cmd_read_size = s; in wiidebug_eeprom_read()
49 wdata->state.cmd_read_buf = buf; in wiidebug_eeprom_read()
50 wiimote_cmd_set(wdata, WIIPROTO_REQ_RMEM, *off & 0xffff); in wiidebug_eeprom_read()
51 wiiproto_req_reeprom(wdata, *off, s); in wiidebug_eeprom_read()
52 spin_unlock_irqrestore(&wdata->state.lock, flags); in wiidebug_eeprom_read()
54 ret = wiimote_cmd_wait(wdata); in wiidebug_eeprom_read()
56 size = wdata->state.cmd_read_size; in wiidebug_eeprom_read()
58 spin_lock_irqsave(&wdata->state.lock, flags); in wiidebug_eeprom_read()
59 wdata->state.cmd_read_buf = NULL; in wiidebug_eeprom_read()
60 spin_unlock_irqrestore(&wdata->state.lock, flags); in wiidebug_eeprom_read()
62 wiimote_cmd_release(wdata); in wiidebug_eeprom_read()
108 spin_lock_irqsave(&dbg->wdata->state.lock, flags); in wiidebug_drm_show()
109 drm = dbg->wdata->state.drm; in wiidebug_drm_show()
110 spin_unlock_irqrestore(&dbg->wdata->state.lock, flags); in wiidebug_drm_show()
156 spin_lock_irqsave(&dbg->wdata->state.lock, flags); in wiidebug_drm_write()
157 dbg->wdata->state.flags &= ~WIIPROTO_FLAG_DRM_LOCKED; in wiidebug_drm_write()
158 wiiproto_req_drm(dbg->wdata, (__u8) i); in wiidebug_drm_write()
160 dbg->wdata->state.flags |= WIIPROTO_FLAG_DRM_LOCKED; in wiidebug_drm_write()
161 spin_unlock_irqrestore(&dbg->wdata->state.lock, flags); in wiidebug_drm_write()
175 int wiidebug_init(struct wiimote_data *wdata) in wiidebug_init() argument
185 dbg->wdata = wdata; in wiidebug_init()
188 dbg->wdata->hdev->debug_dir, dbg, &wiidebug_eeprom_fops); in wiidebug_init()
193 dbg->wdata->hdev->debug_dir, dbg, &wiidebug_drm_fops); in wiidebug_init()
197 spin_lock_irqsave(&wdata->state.lock, flags); in wiidebug_init()
198 wdata->debug = dbg; in wiidebug_init()
199 spin_unlock_irqrestore(&wdata->state.lock, flags); in wiidebug_init()
210 void wiidebug_deinit(struct wiimote_data *wdata) in wiidebug_deinit() argument
212 struct wiimote_debug *dbg = wdata->debug; in wiidebug_deinit()
218 spin_lock_irqsave(&wdata->state.lock, flags); in wiidebug_deinit()
219 wdata->debug = NULL; in wiidebug_deinit()
220 spin_unlock_irqrestore(&wdata->state.lock, flags); in wiidebug_deinit()