Lines Matching full:cd
168 struct channel_detector *cd) in channel_detector_reset() argument
171 if (cd == NULL) in channel_detector_reset()
174 cd->detectors[i]->reset(cd->detectors[i], dpd->last_pulse_ts); in channel_detector_reset()
179 struct channel_detector *cd) in channel_detector_exit() argument
182 if (cd == NULL) in channel_detector_exit()
184 list_del(&cd->head); in channel_detector_exit()
186 struct pri_detector *de = cd->detectors[i]; in channel_detector_exit()
190 kfree(cd->detectors); in channel_detector_exit()
191 kfree(cd); in channel_detector_exit()
198 struct channel_detector *cd; in channel_detector_create() local
200 cd = kmalloc(sizeof(*cd), GFP_ATOMIC); in channel_detector_create()
201 if (cd == NULL) in channel_detector_create()
204 INIT_LIST_HEAD(&cd->head); in channel_detector_create()
205 cd->freq = freq; in channel_detector_create()
206 sz = sizeof(cd->detectors) * dpd->num_radar_types; in channel_detector_create()
207 cd->detectors = kzalloc(sz, GFP_ATOMIC); in channel_detector_create()
208 if (cd->detectors == NULL) in channel_detector_create()
216 cd->detectors[i] = de; in channel_detector_create()
218 list_add(&cd->head, &dpd->channel_detectors); in channel_detector_create()
219 return cd; in channel_detector_create()
224 channel_detector_exit(dpd, cd); in channel_detector_create()
240 struct channel_detector *cd; in channel_detector_get() local
241 list_for_each_entry(cd, &dpd->channel_detectors, head) { in channel_detector_get()
242 if (cd->freq == freq) in channel_detector_get()
243 return cd; in channel_detector_get()
255 struct channel_detector *cd; in dpd_reset() local
256 list_for_each_entry(cd, &dpd->channel_detectors, head) in dpd_reset()
257 channel_detector_reset(dpd, cd); in dpd_reset()
262 struct channel_detector *cd, *cd0; in dpd_exit() local
263 list_for_each_entry_safe(cd, cd0, &dpd->channel_detectors, head) in dpd_exit()
264 channel_detector_exit(dpd, cd); in dpd_exit()
273 struct channel_detector *cd; in dpd_add_pulse() local
282 cd = channel_detector_get(dpd, event->freq); in dpd_add_pulse()
283 if (cd == NULL) in dpd_add_pulse()
293 struct pri_detector *pd = cd->detectors[i]; in dpd_add_pulse()
320 struct channel_detector *cd, *cd0; in dpd_set_domain() local
332 list_for_each_entry_safe(cd, cd0, &dpd->channel_detectors, head) in dpd_set_domain()
333 channel_detector_exit(dpd, cd); in dpd_set_domain()