Lines Matching refs:wdata

18 	struct wiimote_data *wdata;  member
27 struct wiimote_data *wdata = dbg->wdata; in wiidebug_eeprom_read() local
40 ret = wiimote_cmd_acquire(wdata); in wiidebug_eeprom_read()
44 spin_lock_irqsave(&wdata->state.lock, flags); in wiidebug_eeprom_read()
45 wdata->state.cmd_read_size = s; in wiidebug_eeprom_read()
46 wdata->state.cmd_read_buf = buf; in wiidebug_eeprom_read()
47 wiimote_cmd_set(wdata, WIIPROTO_REQ_RMEM, *off & 0xffff); in wiidebug_eeprom_read()
48 wiiproto_req_reeprom(wdata, *off, s); in wiidebug_eeprom_read()
49 spin_unlock_irqrestore(&wdata->state.lock, flags); in wiidebug_eeprom_read()
51 ret = wiimote_cmd_wait(wdata); in wiidebug_eeprom_read()
53 size = wdata->state.cmd_read_size; in wiidebug_eeprom_read()
55 spin_lock_irqsave(&wdata->state.lock, flags); in wiidebug_eeprom_read()
56 wdata->state.cmd_read_buf = NULL; in wiidebug_eeprom_read()
57 spin_unlock_irqrestore(&wdata->state.lock, flags); in wiidebug_eeprom_read()
59 wiimote_cmd_release(wdata); in wiidebug_eeprom_read()
105 spin_lock_irqsave(&dbg->wdata->state.lock, flags); in wiidebug_drm_show()
106 drm = dbg->wdata->state.drm; in wiidebug_drm_show()
107 spin_unlock_irqrestore(&dbg->wdata->state.lock, flags); in wiidebug_drm_show()
153 spin_lock_irqsave(&dbg->wdata->state.lock, flags); in wiidebug_drm_write()
154 dbg->wdata->state.flags &= ~WIIPROTO_FLAG_DRM_LOCKED; in wiidebug_drm_write()
155 wiiproto_req_drm(dbg->wdata, (__u8) i); in wiidebug_drm_write()
157 dbg->wdata->state.flags |= WIIPROTO_FLAG_DRM_LOCKED; in wiidebug_drm_write()
158 spin_unlock_irqrestore(&dbg->wdata->state.lock, flags); in wiidebug_drm_write()
172 int wiidebug_init(struct wiimote_data *wdata) in wiidebug_init() argument
182 dbg->wdata = wdata; in wiidebug_init()
185 dbg->wdata->hdev->debug_dir, dbg, &wiidebug_eeprom_fops); in wiidebug_init()
190 dbg->wdata->hdev->debug_dir, dbg, &wiidebug_drm_fops); in wiidebug_init()
194 spin_lock_irqsave(&wdata->state.lock, flags); in wiidebug_init()
195 wdata->debug = dbg; in wiidebug_init()
196 spin_unlock_irqrestore(&wdata->state.lock, flags); in wiidebug_init()
207 void wiidebug_deinit(struct wiimote_data *wdata) in wiidebug_deinit() argument
209 struct wiimote_debug *dbg = wdata->debug; in wiidebug_deinit()
215 spin_lock_irqsave(&wdata->state.lock, flags); in wiidebug_deinit()
216 wdata->debug = NULL; in wiidebug_deinit()
217 spin_unlock_irqrestore(&wdata->state.lock, flags); in wiidebug_deinit()