Lines Matching refs:dbg
29 struct wiimote_debug *dbg = f->private_data; in wiidebug_eeprom_read() local
30 struct wiimote_data *wdata = dbg->wdata; in wiidebug_eeprom_read()
103 struct wiimote_debug *dbg = f->private; in wiidebug_drm_show() local
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()
131 struct wiimote_debug *dbg = sf->private; in wiidebug_drm_write() local
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()
177 struct wiimote_debug *dbg; in wiidebug_init() local
181 dbg = kzalloc(sizeof(*dbg), GFP_KERNEL); in wiidebug_init()
182 if (!dbg) in wiidebug_init()
185 dbg->wdata = wdata; in wiidebug_init()
187 dbg->eeprom = debugfs_create_file("eeprom", S_IRUSR, in wiidebug_init()
188 dbg->wdata->hdev->debug_dir, dbg, &wiidebug_eeprom_fops); in wiidebug_init()
189 if (!dbg->eeprom) in wiidebug_init()
192 dbg->drm = debugfs_create_file("drm", S_IRUSR, in wiidebug_init()
193 dbg->wdata->hdev->debug_dir, dbg, &wiidebug_drm_fops); in wiidebug_init()
194 if (!dbg->drm) in wiidebug_init()
198 wdata->debug = dbg; in wiidebug_init()
204 debugfs_remove(dbg->eeprom); in wiidebug_init()
206 kfree(dbg); in wiidebug_init()
212 struct wiimote_debug *dbg = wdata->debug; in wiidebug_deinit() local
215 if (!dbg) in wiidebug_deinit()
222 debugfs_remove(dbg->drm); in wiidebug_deinit()
223 debugfs_remove(dbg->eeprom); in wiidebug_deinit()
224 kfree(dbg); in wiidebug_deinit()