From f70575805708cabdedea7498aaa3f710fde4d920 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 31 Jan 2024 03:29:01 +0000 Subject: [PATCH] add lvds1024*800 --- kernel/sound/soc/codecs/wm0010.c | 14 ++++---------- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/kernel/sound/soc/codecs/wm0010.c b/kernel/sound/soc/codecs/wm0010.c index abd2def..28b4656 100644 --- a/kernel/sound/soc/codecs/wm0010.c +++ b/kernel/sound/soc/codecs/wm0010.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * wm0010.c -- WM0010 DSP Driver * @@ -6,10 +7,6 @@ * Authors: Mark Brown <broonie@opensource.wolfsonmicro.com> * Dimitris Papastamos <dp@opensource.wolfsonmicro.com> * Scott Ling <sl@opensource.wolfsonmicro.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ #include <linux/module.h> @@ -46,7 +43,7 @@ u8 command; u32 length:24; u32 address; - uint8_t data[0]; + uint8_t data[]; } __packed; struct dfw_inforec { @@ -349,7 +346,7 @@ struct list_head xfer_list; struct wm0010_boot_xfer *xfer; int ret; - struct completion done; + DECLARE_COMPLETION_ONSTACK(done); const struct firmware *fw; const struct dfw_binrec *rec; const struct dfw_inforec *inforec; @@ -373,7 +370,6 @@ wm0010->boot_failed = false; if (WARN_ON(!list_empty(&xfer_list))) return -EINVAL; - init_completion(&done); /* First record should be INFO */ if (rec->command != DFW_CMD_INFO) { @@ -518,7 +514,7 @@ dev_dbg(component->dev, "Downloading %zu byte stage 2 loader\n", fw->size); /* Copy to local buffer first as vmalloc causes problems for dma */ - img = kzalloc(fw->size, GFP_KERNEL | GFP_DMA); + img = kmemdup(&fw->data[0], fw->size, GFP_KERNEL | GFP_DMA); if (!img) { ret = -ENOMEM; goto abort2; @@ -529,8 +525,6 @@ ret = -ENOMEM; goto abort1; } - - memcpy(img, &fw->data[0], fw->size); spi_message_init(&m); memset(&t, 0, sizeof(t)); -- Gitblit v1.6.2