ASoC: SigmaDSP: Move private structs and functions to C file
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 28 Nov 2011 08:44:19 +0000 (09:44 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 29 Nov 2011 12:01:20 +0000 (12:01 +0000)
Move the structs and functions only used by SigmaDSP firmware loader itself
from the header to the C file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/sigmadsp.c
sound/soc/codecs/sigmadsp.h

index c0ad88516f30a516ec92dc682ff20375e9194146..aa223c56b2b6fea4dfbbff99fd5c36b1599a1f79 100644 (file)
 
 #include "sigmadsp.h"
 
+#define SIGMA_MAGIC "ADISIGM"
+
+struct sigma_firmware_header {
+       unsigned char magic[7];
+       u8 version;
+       __le32 crc;
+} __packed;
+
+enum {
+       SIGMA_ACTION_WRITEXBYTES = 0,
+       SIGMA_ACTION_WRITESINGLE,
+       SIGMA_ACTION_WRITESAFELOAD,
+       SIGMA_ACTION_DELAY,
+       SIGMA_ACTION_PLLWAIT,
+       SIGMA_ACTION_NOOP,
+       SIGMA_ACTION_END,
+};
+
+struct sigma_action {
+       u8 instr;
+       u8 len_hi;
+       __le16 len;
+       __be16 addr;
+       unsigned char payload[];
+} __packed;
+
+struct sigma_firmware {
+       const struct firmware *fw;
+       size_t pos;
+};
+
+static inline u32 sigma_action_len(struct sigma_action *sa)
+{
+       return (sa->len_hi << 16) | le16_to_cpu(sa->len);
+}
+
 static size_t sigma_action_size(struct sigma_action *sa)
 {
        size_t payload = 0;
index d0de882c0d96d5277f23306bf1d2884c40807292..99a609157b2e4ab5772f8ebccc6edf9a44ad9ec1 100644 (file)
@@ -9,47 +9,8 @@
 #ifndef __SIGMA_FIRMWARE_H__
 #define __SIGMA_FIRMWARE_H__
 
-#include <linux/firmware.h>
-#include <linux/types.h>
-
 struct i2c_client;
 
-#define SIGMA_MAGIC "ADISIGM"
-
-struct sigma_firmware {
-       const struct firmware *fw;
-       size_t pos;
-};
-
-struct sigma_firmware_header {
-       unsigned char magic[7];
-       u8 version;
-       __le32 crc;
-};
-
-enum {
-       SIGMA_ACTION_WRITEXBYTES = 0,
-       SIGMA_ACTION_WRITESINGLE,
-       SIGMA_ACTION_WRITESAFELOAD,
-       SIGMA_ACTION_DELAY,
-       SIGMA_ACTION_PLLWAIT,
-       SIGMA_ACTION_NOOP,
-       SIGMA_ACTION_END,
-};
-
-struct sigma_action {
-       u8 instr;
-       u8 len_hi;
-       __le16 len;
-       __be16 addr;
-       unsigned char payload[];
-};
-
-static inline u32 sigma_action_len(struct sigma_action *sa)
-{
-       return (sa->len_hi << 16) | le16_to_cpu(sa->len);
-}
-
 extern int process_sigma_firmware(struct i2c_client *client, const char *name);
 
 #endif