commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=a66026068442ebb516de376c6392027c301d905d branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/2011R1
The firmware header is not part of the CRC, so skip it. Otherwise the firmware would be rejected due to non-matching CRCs Signed-off-by: Lars-Peter Clausen <[email protected]> --- sound/soc/codecs/sigma.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/sound/soc/codecs/sigma.c b/sound/soc/codecs/sigma.c index 2f528d9..b126374 100644 --- a/sound/soc/codecs/sigma.c +++ b/sound/soc/codecs/sigma.c @@ -125,7 +125,8 @@ int process_sigma_firmware(struct i2c_client *client, const char *name) if (memcmp(ssfw_head->magic, SIGMA_MAGIC, ARRAY_SIZE(ssfw_head->magic))) goto done; - crc = crc32(0, fw->data, fw->size); + crc = crc32(0, fw->data + sizeof(*ssfw_head), + fw->size - sizeof(*ssfw_head)); pr_debug("%s: crc=%x\n", __func__, crc); if (crc != ssfw_head->crc) goto done;
_______________________________________________ Linux-kernel-commits mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
