pwc-dec1.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* Linux driver for Philips webcam
  2. Decompression for chipset version 1
  3. (C) 2004-2006 Luc Saillard (luc@saillard.org)
  4. NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
  5. driver and thus may have bugs that are not present in the original version.
  6. Please send bug reports and support requests to <luc@saillard.org>.
  7. The decompression routines have been implemented by reverse-engineering the
  8. Nemosoft binary pwcx module. Caveat emptor.
  9. This program is free software; you can redistribute it and/or modify
  10. it under the terms of the GNU General Public License as published by
  11. the Free Software Foundation; either version 2 of the License, or
  12. (at your option) any later version.
  13. This program is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. GNU General Public License for more details.
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. */
  21. #include "pwc-dec1.h"
  22. int pwc_dec1_init(struct pwc_device *pwc, int type, int release, void *buffer)
  23. {
  24. struct pwc_dec1_private *pdec;
  25. if (pwc->decompress_data == NULL) {
  26. pdec = kmalloc(sizeof(struct pwc_dec1_private), GFP_KERNEL);
  27. if (pdec == NULL)
  28. return -ENOMEM;
  29. pwc->decompress_data = pdec;
  30. }
  31. pdec = pwc->decompress_data;
  32. return 0;
  33. }