Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273879
b: refs/heads/master
c: 7b4b88e
h: refs/heads/master
i:
  273877: e359f0d
  273875: 6fdfed1
  273871: 59e149d
v: v3
  • Loading branch information
Sascha Hauer authored and Vinod Koul committed Aug 29, 2011
1 parent 072e072 commit ca14309
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 36e2f21ab481b3d6bd31b99e1de669fbbac4bd0e
refs/heads/master: 7b4b88e067d37cbbafd856121767f7e154294eb2
23 changes: 16 additions & 7 deletions trunk/drivers/dma/imx-sdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,18 +1143,17 @@ static void sdma_add_scripts(struct sdma_engine *sdma,
saddr_arr[i] = addr_arr[i];
}

static int __init sdma_get_firmware(struct sdma_engine *sdma,
const char *fw_name)
static void sdma_load_firmware(const struct firmware *fw, void *context)
{
const struct firmware *fw;
struct sdma_engine *sdma = context;
const struct sdma_firmware_header *header;
int ret;
const struct sdma_script_start_addrs *addr;
unsigned short *ram_code;

ret = request_firmware(&fw, fw_name, sdma->dev);
if (ret)
return ret;
if (!fw) {
dev_err(sdma->dev, "firmware not found\n");
return;
}

if (fw->size < sizeof(*header))
goto err_firmware;
Expand Down Expand Up @@ -1184,6 +1183,16 @@ static int __init sdma_get_firmware(struct sdma_engine *sdma,

err_firmware:
release_firmware(fw);
}

static int __init sdma_get_firmware(struct sdma_engine *sdma,
const char *fw_name)
{
int ret;

ret = request_firmware_nowait(THIS_MODULE,
FW_ACTION_HOTPLUG, fw_name, sdma->dev,
GFP_KERNEL, sdma, sdma_load_firmware);

return ret;
}
Expand Down

0 comments on commit ca14309

Please sign in to comment.