aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2008-10-17 13:55:32 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-22 12:56:34 -0400
commitf07639adebd573709ea0d6b67bec9b620fe3083e (patch)
treec021a6e2d78cdefbeb3611e691b6720880f4c34e /drivers/staging
parentdb2af149bd0c798ce599365ee4320dd30dda852c (diff)
Staging: echo: remove dead code
This patch removes dead code that is wrapped in #ifndef __KERNEL__. Cc: David Rowe <david@rowetel.com> Cc: Steve Underwood <steveu@coppice.org> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/echo/fir.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/drivers/staging/echo/fir.h b/drivers/staging/echo/fir.h
index c29e1e245c6..19c20cde186 100644
--- a/drivers/staging/echo/fir.h
+++ b/drivers/staging/echo/fir.h
@@ -312,51 +312,6 @@ static __inline__ int16_t fir32(fir32_state_t *fir, int16_t sample)
312} 312}
313/*- End of function --------------------------------------------------------*/ 313/*- End of function --------------------------------------------------------*/
314 314
315#ifndef __KERNEL__
316static __inline__ const float *fir_float_create(fir_float_state_t *fir,
317 const float *coeffs,
318 int taps)
319{
320 fir->taps = taps;
321 fir->curr_pos = taps - 1;
322 fir->coeffs = coeffs;
323 fir->history = (float *) malloc(taps*sizeof(float));
324 if (fir->history)
325 memset(fir->history, '\0', taps*sizeof(float));
326 return fir->history;
327}
328/*- End of function --------------------------------------------------------*/
329
330static __inline__ void fir_float_free(fir_float_state_t *fir)
331{
332 free(fir->history);
333}
334/*- End of function --------------------------------------------------------*/
335
336static __inline__ int16_t fir_float(fir_float_state_t *fir, int16_t sample)
337{
338 int i;
339 float y;
340 int offset1;
341 int offset2;
342
343 fir->history[fir->curr_pos] = sample;
344
345 offset2 = fir->curr_pos;
346 offset1 = fir->taps - offset2;
347 y = 0;
348 for (i = fir->taps - 1; i >= offset1; i--)
349 y += fir->coeffs[i]*fir->history[i - offset1];
350 for ( ; i >= 0; i--)
351 y += fir->coeffs[i]*fir->history[i + offset2];
352 if (fir->curr_pos <= 0)
353 fir->curr_pos = fir->taps;
354 fir->curr_pos--;
355 return (int16_t) y;
356}
357/*- End of function --------------------------------------------------------*/
358#endif
359
360#ifdef __cplusplus 315#ifdef __cplusplus
361} 316}
362#endif 317#endif