diff options
author | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
---|---|---|
committer | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
commit | 871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch) | |
tree | 8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/sound/pci/ctxfi/cthardware.c | |
parent | 9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff) | |
download | FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2 FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip |
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized.
Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/sound/pci/ctxfi/cthardware.c')
-rw-r--r-- | ANDROID_3.4.5/sound/pci/ctxfi/cthardware.c | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/ANDROID_3.4.5/sound/pci/ctxfi/cthardware.c b/ANDROID_3.4.5/sound/pci/ctxfi/cthardware.c deleted file mode 100644 index 8e64f486..00000000 --- a/ANDROID_3.4.5/sound/pci/ctxfi/cthardware.c +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (C) 2008, Creative Technology Ltd. All Rights Reserved. - * - * This source file is released under GPL v2 license (no other versions). - * See the COPYING file included in the main directory of this source - * distribution for the license terms and conditions. - * - * @File cthardware.c - * - * @Brief - * This file contains the implementation of hardware access methord. - * - * @Author Liu Chun - * @Date Jun 26 2008 - * - */ - -#include "cthardware.h" -#include "cthw20k1.h" -#include "cthw20k2.h" -#include <linux/bug.h> - -int __devinit create_hw_obj(struct pci_dev *pci, enum CHIPTYP chip_type, - enum CTCARDS model, struct hw **rhw) -{ - int err; - - switch (chip_type) { - case ATC20K1: - err = create_20k1_hw_obj(rhw); - break; - case ATC20K2: - err = create_20k2_hw_obj(rhw); - break; - default: - err = -ENODEV; - break; - } - if (err) - return err; - - (*rhw)->pci = pci; - (*rhw)->chip_type = chip_type; - (*rhw)->model = model; - - return 0; -} - -int destroy_hw_obj(struct hw *hw) -{ - int err; - - switch (hw->pci->device) { - case 0x0005: /* 20k1 device */ - err = destroy_20k1_hw_obj(hw); - break; - case 0x000B: /* 20k2 device */ - err = destroy_20k2_hw_obj(hw); - break; - default: - err = -ENODEV; - break; - } - - return err; -} - -unsigned int get_field(unsigned int data, unsigned int field) -{ - int i; - - BUG_ON(!field); - /* @field should always be greater than 0 */ - for (i = 0; !(field & (1 << i)); ) - i++; - - return (data & field) >> i; -} - -void set_field(unsigned int *data, unsigned int field, unsigned int value) -{ - int i; - - BUG_ON(!field); - /* @field should always be greater than 0 */ - for (i = 0; !(field & (1 << i)); ) - i++; - - *data = (*data & (~field)) | ((value << i) & field); -} - |