Lines Matching full:cd
169 struct channel_detector *cd) in channel_detector_reset() argument
172 if (cd == NULL) in channel_detector_reset()
175 cd->detectors[i]->reset(cd->detectors[i], dpd->last_pulse_ts); in channel_detector_reset()
180 struct channel_detector *cd) in channel_detector_exit() argument
183 if (cd == NULL) in channel_detector_exit()
185 list_del(&cd->head); in channel_detector_exit()
186 if (cd->detectors) { in channel_detector_exit()
188 struct pri_detector *de = cd->detectors[i]; in channel_detector_exit()
193 kfree(cd->detectors); in channel_detector_exit()
194 kfree(cd); in channel_detector_exit()
201 struct channel_detector *cd; in channel_detector_create() local
203 cd = kmalloc(sizeof(*cd), GFP_ATOMIC); in channel_detector_create()
204 if (cd == NULL) in channel_detector_create()
207 INIT_LIST_HEAD(&cd->head); in channel_detector_create()
208 cd->freq = freq; in channel_detector_create()
209 cd->detectors = kmalloc_array(dpd->num_radar_types, in channel_detector_create()
210 sizeof(*cd->detectors), GFP_ATOMIC); in channel_detector_create()
211 if (cd->detectors == NULL) in channel_detector_create()
219 cd->detectors[i] = de; in channel_detector_create()
221 list_add(&cd->head, &dpd->channel_detectors); in channel_detector_create()
222 return cd; in channel_detector_create()
227 channel_detector_exit(dpd, cd); in channel_detector_create()
244 struct channel_detector *cd; in channel_detector_get() local
245 list_for_each_entry(cd, &dpd->channel_detectors, head) { in channel_detector_get()
246 if (cd->freq == freq) in channel_detector_get()
247 return cd; in channel_detector_get()
259 struct channel_detector *cd; in dpd_reset() local
260 list_for_each_entry(cd, &dpd->channel_detectors, head) in dpd_reset()
261 channel_detector_reset(dpd, cd); in dpd_reset()
266 struct channel_detector *cd, *cd0; in dpd_exit() local
267 list_for_each_entry_safe(cd, cd0, &dpd->channel_detectors, head) in dpd_exit()
268 channel_detector_exit(dpd, cd); in dpd_exit()
277 struct channel_detector *cd; in dpd_add_pulse() local
286 cd = channel_detector_get(dpd, event->freq); in dpd_add_pulse()
287 if (cd == NULL) in dpd_add_pulse()
297 struct pri_detector *pd = cd->detectors[i]; in dpd_add_pulse()
324 struct channel_detector *cd, *cd0; in dpd_set_domain() local
336 list_for_each_entry_safe(cd, cd0, &dpd->channel_detectors, head) in dpd_set_domain()
337 channel_detector_exit(dpd, cd); in dpd_set_domain()